diff options
| author | megamage <none@none> | 2009-01-26 18:13:21 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2009-01-26 18:13:21 -0600 |
| commit | 91d49437bd51c8d928e8f5e0c06a8777d9e01f14 (patch) | |
| tree | 1d175f64b96d2e58044d4afed90ce0e5c2a475aa /src | |
| parent | 039791db46c5fb94cedce1c2688926494e7f2757 (diff) | |
*Fix charge speed.
--HG--
branch : trunk
Diffstat (limited to 'src')
| -rw-r--r-- | src/game/DestinationHolderImp.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/game/DestinationHolderImp.h b/src/game/DestinationHolderImp.h index f799c8613e7..f30768e7993 100644 --- a/src/game/DestinationHolderImp.h +++ b/src/game/DestinationHolderImp.h @@ -96,14 +96,12 @@ DestinationHolder<TRAVELLER>::StartTravel(TRAVELLER &traveller, bool sendMove) else //Walking on the ground dist = sqrt((dx*dx) + (dy*dy)); + float speed; if(traveller.GetTraveller().hasUnitState(UNIT_STAT_CHARGING)) - i_totalTravelTime = 1000; + speed = 0.025f; // assume it is 25 yard per second else - { - float speed = traveller.Speed(); - speed *= 0.001f; // speed is in seconds so convert from second to millisecond - i_totalTravelTime = static_cast<uint32>(dist/speed); - } + speed = traveller.Speed() * 0.001f; // speed is in seconds so convert from second to millisecond + i_totalTravelTime = static_cast<uint32>(dist/speed); i_timeElapsed = 0; if(sendMove) |
