aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/game/DestinationHolderImp.h10
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)