projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65a0b6f
)
expressed my opinion on code layout..
author
Miloš Klouček
<m.kloucek.m@atlas.cz>
Sat, 9 May 2009 18:15:32 +0000
(18:15 +0000)
committer
Miloš Klouček
<m.kloucek.m@atlas.cz>
Sat, 9 May 2009 18:15:32 +0000
(18:15 +0000)
SVN-Revision: 5890
src/object/player.cpp
patch
|
blob
|
history
diff --git
a/src/object/player.cpp
b/src/object/player.cpp
index
f04cb90
..
02cfc13
100644
(file)
--- a/
src/object/player.cpp
+++ b/
src/object/player.cpp
@@
-415,8
+415,7
@@
Player::apply_friction()
physic.set_velocity_x(0);
physic.set_acceleration_x(0);
} else {
- float friction = on_ice ? (WALK_ACCELERATION_X * ICE_FRICTION_MULTIPLIER) :
- (WALK_ACCELERATION_X * NORMAL_FRICTION_MULTIPLIER);
+ 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)*/ {