projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
716a056
)
- [sort of] reverted flapping to it's old form
author
Ryan Flegel
<rflegel@gmail.com>
Thu, 7 Oct 2004 23:03:07 +0000
(23:03 +0000)
committer
Ryan Flegel
<rflegel@gmail.com>
Thu, 7 Oct 2004 23:03:07 +0000
(23:03 +0000)
SVN-Revision: 1989
src/player.cpp
patch
|
blob
|
history
diff --git
a/src/player.cpp
b/src/player.cpp
index
ecea4f9
..
5e33cc8
100644
(file)
--- a/
src/player.cpp
+++ b/
src/player.cpp
@@
-603,14
+603,25
@@
Player::handle_vertical_input()
// XXX: magic numbers. should be a percent of gravity
// gravity is (by default) -0.1f
// XXX: magic numbers. should be a percent of gravity
// gravity is (by default) -0.1f
- physic.set_acceleration_y(.05 + .06f*xr);
+ physic.set_acceleration_y(.12 + .01f*xr);
+
+#if 0
+ // To slow down x-vel when flapping (not working)
+ if (fabsf(physic.get_velocity_x()) > MAX_WALK_XM)
+ {
+ if (physic.get_velocity_x() < 0)
+ physic.set_acceleration_x(1.0f);
+ else if (physic.get_velocity_x() > 0)
+ physic.set_acceleration_x(-1.0f);
+ }
+#endif
}
}
else
{
physic.set_acceleration_y(0);
}
}
}
else
{
physic.set_acceleration_y(0);
}
-
+
// Hover
//(disabled by default, use cheat code "hover" to toggle on/off)
//TODO: needs some tweaking, especially when used together with double jump and jumping off badguys
// Hover
//(disabled by default, use cheat code "hover" to toggle on/off)
//TODO: needs some tweaking, especially when used together with double jump and jumping off badguys