Update of /cvsroot/super-tux/supertux/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30433
Modified Files:
player.cpp player.h
Log Message:
- removed auto-repeat of jump events, now one has to press again to jump and can't just hold button, makes the game a little bit more difficult, but removes the ugly situations with largetux stuck directly under a tile and bouncing up and down all the time
Index: player.cpp
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/player.cpp,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -d -r1.72 -r1.73
--- player.cpp 29 Apr 2004 00:15:10 -0000 1.72
+++ player.cpp 29 Apr 2004 00:43:06 -0000 1.73
@@ -371,7 +371,7 @@
void
Player::handle_vertical_input()
{
- if(input.up == DOWN)
+ if(input.up == DOWN && input.old_up == UP)
{
if (on_ground())
{
@@ -410,6 +410,7 @@
{
handle_vertical_input();
}
+ input.old_up = input.up;
/* Shoot! */
Index: player.h
===================================================================
RCS file: /cvsroot/super-tux/supertux/src/player.h,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- player.h 29 Apr 2004 00:15:10 -0000 1.44
+++ player.h 29 Apr 2004 00:43:17 -0000 1.45
@@ -65,6 +65,7 @@
int right;
int left;
int up;
+ int old_up;
int down;
int fire;
int old_fire;
|