- removed auto-repeat of jump events, now one has to press again to jump and can...
authorIngo Ruhnke <grumbel@gmx.de>
Thu, 29 Apr 2004 00:43:17 +0000 (00:43 +0000)
committerIngo Ruhnke <grumbel@gmx.de>
Thu, 29 Apr 2004 00:43:17 +0000 (00:43 +0000)
SVN-Revision: 828

src/player.cpp
src/player.h

index fe5604f..afc0c65 100644 (file)
@@ -371,7 +371,7 @@ Player::handle_horizontal_input()
 void
 Player::handle_vertical_input()
 {
-  if(input.up == DOWN)
+  if(input.up == DOWN && input.old_up == UP)
     {
       if (on_ground())
         {
@@ -410,6 +410,7 @@ Player::handle_input()
     {
       handle_vertical_input();
     }
+  input.old_up = input.up;
 
   /* Shoot! */
 
index 2199f23..ef3df44 100644 (file)
@@ -65,6 +65,7 @@ struct player_input_type
   int right;
   int left;
   int up;
+  int old_up;
   int down;
   int fire;
   int old_fire;