Changed FloatingScore to support text (changed name to FloatingText). I guess this...
[supertux.git] / src / player.cpp
index 8e42906..533e761 100644 (file)
@@ -563,7 +563,10 @@ Player::handle_vertical_input()
    // Flapping
    if (input.up == DOWN && can_flap)
      {
-         if (!flapping_timer.started()) {flapping_timer.start(TUX_FLAPPING_TIME);}
+         if (!flapping_timer.started())
+            {
+               flapping_timer.start(TUX_FLAPPING_TIME);
+            }
          if (!flapping_timer.check()) 
             {
                can_flap = false;
@@ -651,6 +654,7 @@ Player::handle_vertical_input()
       jumping = false;
       flapping = false;
       falling_from_flap = false;
+      if (flapping_timer.started()) {flapping_timer.stop();}
     }
 
   input.old_up = input.up;
@@ -1149,6 +1153,10 @@ Player::check_bounds(Camera* camera)
 void
 Player::bounce(BadGuy* badguy)
 {
+  //Make sure we stopped flapping
+  flapping = false;
+  falling_from_flap = false;
+
   if (input.up)
     physic.set_velocity_y(5.2);
   else