From: Christoph Sommer Date: Wed, 1 Nov 2006 03:18:20 +0000 (+0000) Subject: Only backflip if player is not holding down LEFT or RIGHT X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5b3f2cece7f804afc2b64994031096949e3f0427;p=supertux.git Only backflip if player is not holding down LEFT or RIGHT SVN-Revision: 4429 --- diff --git a/src/object/player.cpp b/src/object/player.cpp index f995622e4..de9d24cc5 100644 --- a/src/object/player.cpp +++ b/src/object/player.cpp @@ -526,7 +526,7 @@ Player::handle_vertical_input() if(controller->pressed(Controller::JUMP) && (can_jump)) { if (duck) { // when running, only jump a little bit; else do a backflip - if (physic.get_velocity_x() != 0) do_jump(-300); else do_backflip(); + if ((physic.get_velocity_x() != 0) || (controller->hold(Controller::LEFT)) || (controller->hold(Controller::RIGHT))) do_jump(-300); else do_backflip(); } else { // jump a bit higher if we are running; else do a normal jump if (fabs(physic.get_velocity_x()) > MAX_WALK_XM) do_jump(-580); else do_jump(-520);