Fix for correct music playing after dying in a different sector
[supertux.git] / src / supertux / sector.cpp
index 146db5a..351fe31 100644 (file)
@@ -1500,7 +1500,14 @@ Sector::play_music(MusicType type)
 void
 Sector::resume_music()
 {
-  SoundManager::current()->resume_music(1.5f);
+  if(SoundManager::current()->get_current_music() == music)
+  {
+    SoundManager::current()->resume_music(1.5f);
+  }
+  else
+  {
+    SoundManager::current()->play_music(music, true);
+  }
 }
 
 MusicType