From fe153c7b2598262281477882a2ef82400b24f5b5 Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Thu, 17 Mar 2011 01:43:16 +0100 Subject: Fixed the Being::logic() once again as pointed out by Thorbjorn. Luckily or not, the code did the intended without even being right. :) --- src/being.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/being.cpp') 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 -- cgit v1.2.3-70-g09d2