From 53658c421bfe7148cb2781b793b194b4668a11ff Mon Sep 17 00:00:00 2001 From: Wolfgang Becker Date: Sat, 27 Jun 2009 16:13:55 +0000 Subject: [PATCH] Do not apply friction if Tux's x-velocity is zero. SVN-Revision: 5904 --- src/object/player.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object/player.cpp b/src/object/player.cpp index 25c72c9c7..58698bebb 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -417,9 +417,9 @@ Player::apply_friction() float friction = WALK_ACCELERATION_X * (on_ice ? ICE_FRICTION_MULTIPLIER : NORMAL_FRICTION_MULTIPLIER); if(physic.get_velocity_x() < 0) { physic.set_acceleration_x(friction); - } else /*if(physic.get_velocity_x() > 0)*/ { + } else if(physic.get_velocity_x() > 0) { physic.set_acceleration_x(-friction); - } + } // no friction for physic.get_velocity_x() == 0 } } -- 2.11.0