diff --git a/BUGS b/BUGS deleted file mode 100644 index 54823b6..0000000 --- a/BUGS +++ /dev/null @@ -1,2 +0,0 @@ -* 90° angle bug -* results list isn't sorted diff --git a/ctanks.c b/ctanks.c index 28190b5..2386f3f 100644 --- a/ctanks.c +++ b/ctanks.c @@ -305,9 +305,15 @@ tanks_move_tank(struct tanks_game *game, v[1] = tank->speed.current[1] * (1 - friction) * (TANK_TOP_SPEED / 100.0); /* Outside and inside speeds */ - So = max(v[0], v[1]); - Si = min(v[0], v[1]); - dir = (v[0] > v[1]) ? 1 : -1; + if (fabsf(v[0]) > abs(v[1])) { + Si = v[1]; + So = v[0]; + dir = 1; + } else { + Si = v[0]; + So = v[1]; + dir = -1; + } /* Radius of circle to outside tread (use similar triangles) */ r = So * (TANK_RADIUS * 2) / (So - Si); diff --git a/intro.html b/intro.html index 0097c55..c59f48c 100644 --- a/intro.html +++ b/intro.html @@ -130,7 +130,7 @@ get-turret 12 + set-turret! ( Rotate turret )