fixed bug with envelopes only displayed for the first player
authorHolger Schemel <info@artsoft.org>
Sat, 16 Feb 2019 09:52:55 +0000 (10:52 +0100)
committerHolger Schemel <info@artsoft.org>
Sat, 16 Feb 2019 09:52:55 +0000 (10:52 +0100)
src/game.c

index 2dcc07a496969b3782f16f9908c60e1d5106cc65..c7589cf005057b7a46c2fd1ec22ad7ba36d59a08 100644 (file)
@@ -12180,12 +12180,17 @@ void GameActions_RND(void)
   DrawAllPlayers();
   PlayAllPlayersSound();
 
-  if (local_player->show_envelope != 0 && (!local_player->active ||
-                                          local_player->MovPos == 0))
+  for (i = 0; i < MAX_PLAYERS; i++)
   {
-    ShowEnvelope(local_player->show_envelope - EL_ENVELOPE_1);
+    struct PlayerInfo *player = &stored_player[i];
 
-    local_player->show_envelope = 0;
+    if (player->show_envelope != 0 && (!player->active ||
+                                      player->MovPos == 0))
+    {
+      ShowEnvelope(player->show_envelope - EL_ENVELOPE_1);
+
+      player->show_envelope = 0;
+    }
   }
 
   // use random number generator in every frame to make it less predictable