summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-17 01:43:16 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-03-17 01:43:16 +0100
commitfe153c7b2598262281477882a2ef82400b24f5b5 (patch)
tree1e713f6d6c815eec702f1049538a5022c95de5da /src
parentc6462143d107c35846cadc45e205d8ecedb6bf7a (diff)
downloadmana-fe153c7b2598262281477882a2ef82400b24f5b5.tar.gz
mana-fe153c7b2598262281477882a2ef82400b24f5b5.tar.bz2
mana-fe153c7b2598262281477882a2ef82400b24f5b5.tar.xz
mana-fe153c7b2598262281477882a2ef82400b24f5b5.zip
Fixed the Being::logic() once again as pointed out by Thorbjorn.
Luckily or not, the code did the intended without even being right. :)
Diffstat (limited to 'src')
-rw-r--r--src/being.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/being.cpp b/src/being.cpp
index 6b971dbf..7429a95d 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -746,10 +746,10 @@ void Being::logic()
// Update the player sprite direction.
// N.B.: We only change this if the distance is more than one pixel
- // to avoid flawing the ending direction,
- // or More than the speed in pixel per ticks for very slow beings.
+ // to avoid flawing the ending direction for players,
+ // but always for very slow beings.
float maxDistance = mSpeedPixelsPerTick.length();
- if (distance > (maxDistance < 1.0f) ? maxDistance : 1.0f)
+ if (distance > ((maxDistance > 1.0f) ? 1.0f : 0.0f))
{
// The player direction is handled for keyboard
// by LocalPlayer::startWalking(), we shouldn't get