From: Ingo Ruhnke Date: Thu, 29 Apr 2004 00:43:17 +0000 (+0000) Subject: - removed auto-repeat of jump events, now one has to press again to jump and can... X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=41037fd38811c825b347aa25daea22d240502a65;p=supertux.git - 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 SVN-Revision: 828 --- diff --git a/src/player.cpp b/src/player.cpp index fe5604f60..afc0c6517 100644 --- a/src/player.cpp +++ b/src/player.cpp @@ -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! */ diff --git a/src/player.h b/src/player.h index 2199f2357..ef3df4471 100644 --- a/src/player.h +++ b/src/player.h @@ -65,6 +65,7 @@ struct player_input_type int right; int left; int up; + int old_up; int down; int fire; int old_fire;