fixed bug with not recognizing ".mode_loop: false" for music
[rocksndiamonds.git] / src / tools.c
index ab6c4efa28f32b808b095e4955afc0966798750a..a11f692eb2d66a2abd495ceab77017d10b0de2ca 100644 (file)
@@ -4570,6 +4570,7 @@ static boolean RequestDoor(char *text, unsigned int req_state)
   /* pause network game while waiting for request to answer */
   if (network.enabled &&
       game_status == GAME_MODE_PLAYING &&
+      !AllPlayersGone &&
       req_state & REQUEST_WAIT_FOR_INPUT)
     SendToServer_PausePlaying();
 
@@ -4710,6 +4711,7 @@ static boolean RequestDoor(char *text, unsigned int req_state)
   /* continue network game after request */
   if (network.enabled &&
       game_status == GAME_MODE_PLAYING &&
+      !AllPlayersGone &&
       req_state & REQUEST_WAIT_FOR_INPUT)
     SendToServer_ContinuePlaying();
 
@@ -4736,6 +4738,7 @@ static boolean RequestEnvelope(char *text, unsigned int req_state)
   /* pause network game while waiting for request to answer */
   if (network.enabled &&
       game_status == GAME_MODE_PLAYING &&
+      !AllPlayersGone &&
       req_state & REQUEST_WAIT_FOR_INPUT)
     SendToServer_PausePlaying();
 
@@ -4793,6 +4796,7 @@ static boolean RequestEnvelope(char *text, unsigned int req_state)
   /* continue network game after request */
   if (network.enabled &&
       game_status == GAME_MODE_PLAYING &&
+      !AllPlayersGone &&
       req_state & REQUEST_WAIT_FOR_INPUT)
     SendToServer_ContinuePlaying();
 
@@ -8111,7 +8115,7 @@ int getBeltSwitchElementFromBeltNrAndBeltDir(int belt_nr, int belt_dir)
 
 boolean getTeamMode_EM()
 {
-  return game.team_mode;
+  return game.team_mode || network_playing;
 }
 
 int getGameFrameDelay_EM(int native_em_game_frame_delay)
@@ -9211,7 +9215,10 @@ void PlayMenuMusicExt(int music)
   if (!setup.sound_music)
     return;
 
-  PlayMusic(music);
+  if (IS_LOOP_MUSIC(music))
+    PlayMusicLoop(music);
+  else
+    PlayMusic(music);
 }
 
 void PlayMenuMusic()
@@ -9387,6 +9394,13 @@ void ResetFontStatus()
   SetFontStatus(-1);
 }
 
+void SetLevelSetInfo(char *identifier, int level_nr)
+{
+  setString(&levelset.identifier, identifier);
+
+  levelset.level_nr = level_nr;
+}
+
 boolean CheckIfPlayfieldViewportHasChanged()
 {
   // if game status has not changed, playfield viewport has not changed either