projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c13404a
)
Do not apply friction if Tux's x-velocity is zero.
author
Wolfgang Becker
<uafr@gmx.de>
Sat, 27 Jun 2009 16:13:55 +0000
(16:13 +0000)
committer
Wolfgang Becker
<uafr@gmx.de>
Sat, 27 Jun 2009 16:13:55 +0000
(16:13 +0000)
SVN-Revision: 5904
src/object/player.cpp
patch
|
blob
|
history
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
25c72c9
..
58698be
100644
(file)
--- 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
}
}