summaryrefslogtreecommitdiff
path: root/src/being.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/being.cpp')
-rw-r--r--src/being.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 1e6da93e..6ce2120a 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -534,17 +534,11 @@ void Being::logic()
// When we've not reached our destination, move to it.
if (nominalLength > 1.0f && mWalkSpeed > 0.0f)
{
- // The private mWalkSpeed member is the speed in tiles per second.
- // We translate it into pixels per tick,
- // because the logic is called every ticks.
- const float speedInTicks = ((float)DEFAULT_TILE_SIDE_LENGTH * mWalkSpeed)
- / 1000 * (float)MILLISECONDS_IN_A_TICK;
-
// The deplacement of a point along a vector is calculated
// using the Unit Vector (â) multiplied by the point speed.
// â = a / ||a|| (||a|| is the a length.)
// Then, diff = (dir/||dir||)*speed, or (dir / ||dir|| / 1/speed).
- Vector diff = (dir / (nominalLength / speedInTicks));
+ Vector diff = (dir / (nominalLength / mWalkSpeed));
// Test if we don't miss the destination by a move too far:
if (diff.length() > nominalLength)