fixed handling game actions during "play again" request in network mode
authorHolger Schemel <info@artsoft.org>
Fri, 12 Oct 2018 21:41:05 +0000 (23:41 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 12 Oct 2018 21:48:13 +0000 (23:48 +0200)
src/game.c

index eed459776345f33d6bc402864eb4ba6bf1a56c00..8d1954dab05e888ce586d6eb4463233f4e2eb475 100644 (file)
@@ -11346,7 +11346,8 @@ static void GameActionsExt(void)
     if (game_status != GAME_MODE_PLAYING)
       return;
 
-    if (!network_player_action_received)
+    /* check if network player actions still missing and game still running */
+    if (!network_player_action_received && !checkGameEnded())
       return;          /* failed to get network player actions in time */
 
     /* do not yet reset "network_player_action_received" (for tape.pausing) */
@@ -11386,7 +11387,7 @@ static void GameActionsExt(void)
       stored_player[i].effective_action = stored_player[i].action;
   }
 
-  if (network_playing)
+  if (network_playing && !checkGameEnded())
     SendToServer_MovePlayer(summarized_player_action);
 
   // summarize all actions at local players mapped input device position