diff options
author | QAston <none@none> | 2009-03-12 00:15:51 +0100 |
---|---|---|
committer | QAston <none@none> | 2009-03-12 00:15:51 +0100 |
commit | 0df5a32c0ae5fca6455c8294daaea774b76b1787 (patch) | |
tree | 0caf458856dfec8381108e33e1c77d35c41913ef | |
parent | 6683ae58c9e2cbea5f43089b739d7e50eacd4465 (diff) |
*Fix -100% speed mods on creatures-this fixes Chains of Ice.
--HG--
branch : trunk
-rw-r--r-- | src/game/Traveller.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/game/Traveller.h b/src/game/Traveller.h index c1bb6faa597..1042e73f654 100644 --- a/src/game/Traveller.h +++ b/src/game/Traveller.h @@ -67,9 +67,10 @@ inline uint32 Traveller<T>::GetTotalTrevelTimeTo(float x, float y, float z) float speed = 0.001f; if(GetTraveller().hasUnitState(UNIT_STAT_CHARGING)) speed *= SPEED_CHARGE; + else if (Speed() <= 0.0f) + return 0xfffffffe; // almost infinity-unit should stop else speed *= Speed(); // speed is in seconds so convert from second to millisecond - return static_cast<uint32>(dist/speed); } |