equal
deleted
inserted
replaced
423 end |
423 end |
424 |
424 |
425 -------------------------------------Misc--------------------------------- |
425 -------------------------------------Misc--------------------------------- |
426 |
426 |
427 function StoppedGear(gear) |
427 function StoppedGear(gear) |
|
428 -- GetHealth returns nil if gear does not exist |
|
429 if not GetHealth(gear) then |
|
430 -- We consider the gear to be “stopped” if it has been destroyed |
|
431 return true |
|
432 end |
428 dx,dy = GetGearVelocity(gear) |
433 dx,dy = GetGearVelocity(gear) |
429 return math.abs(dx) <= 1 and math.abs(dy) <= 1 |
434 return math.abs(dx) <= 1 and math.abs(dy) <= 1 |
430 end |
435 end |