~v1 is the distance that the enemy is in front of Torque. ~v2
is the distance that the enemyis to the side of Torque. If both of these
are between -1 and +1, then the enemy must be on Torque's perimeter, so
he jumps to his discharge-energy routine.
One part of this line appears to make no sense at first glance. This
The reason behind these two statements is as follows:
When cloaking was being introduced, it was at first suggested that a cloaked
enemy's variables (#enemy_x
would be zero. This explains the first part. If the enemy is cloaked then
no matter where it is, its x- and y-coordinates would be between -1 and
+1, so Torque would think that the enemy was on his perimeter. Torque doesn't
want to discharge energy needlessly, so this check was to prevent this
... if value #enemy_x <> 0 then if value ~v9
= ~v9 then...
In fact, the idea of having a cloaked cybug's
status variables set to zero never actually happened. When an enemy cybug
is cloaked, you just see the next-closest enemy as if it were actually
the closest enemy.
The second part is just a pointless always-true
expression, so that Shea could use a find-and-replace tool to add any necessary
extra checks, once the cloaking situation had been finalised. If no extra
checks were needed, then this expression would make no difference to Torque's