Butt-jump stops gliding
authorLMH <lmh.0013@gmail.com>
Sat, 15 Nov 2014 23:17:02 +0000 (13:17 -1000)
committerLMH <lmh.0013@gmail.com>
Sat, 15 Nov 2014 23:26:41 +0000 (13:26 -1000)
src/object/player.cpp

index 3af291c..a6aeed7 100644 (file)
@@ -734,7 +734,8 @@ Player::handle_vertical_input()
         ability_timer.start(glide_time);
       else if (ability_timer.started()) {
         log_debug << ability_timer.get_timeleft() << std::endl;
-        if (ability_timer.get_timeleft() <= 0.05f) {
+        // glide stops after some duration or if buttjump is initiated
+        if ((ability_timer.get_timeleft() <= 0.05f) || controller->hold(Controller::DOWN)) {
           glide_time = 0;
           ability_timer.stop();
         } else {