Fade out and pause music on death and resume on restart of level, fixes #1064
[supertux.git] / src / object / player.cpp
index 7fa5983..93c1094 100644 (file)
@@ -416,6 +416,7 @@ Player::update(float elapsed_time)
     if (backflipping && (backflip_timer.get_timegone() > 0.15f)) {
       backflipping = false;
       backflip_direction = 0;
+      physic.set_velocity_x(0);
       if (!stone) {
         sprite->set_angle(0.0f);
         powersprite->set_angle(0.0f);
@@ -1525,7 +1526,7 @@ Player::kill(bool completely)
 
     // TODO: need nice way to handle players dying in co-op mode
     Sector::current()->effect->fade_out(3.0);
-    SoundManager::current()->stop_music(3.0);
+    SoundManager::current()->pause_music(3.0);
   }
 }