fixed bug in network mode with pausing game on errors when not playing
authorHolger Schemel <info@artsoft.org>
Sat, 18 Aug 2018 13:05:07 +0000 (15:05 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 18 Aug 2018 13:05:07 +0000 (15:05 +0200)
src/network.c

index 0b3c6a8f0b6c27be5385663fbb6311e4d3e5cd07..f5148cd44615bd890860122333d5a4d216a4f1b0 100644 (file)
@@ -645,8 +645,11 @@ static void Handle_OP_PAUSE_PLAYING()
   printf("OP_PAUSE_PLAYING: %d\n", buffer[0]);
   Error(ERR_NETWORK_CLIENT, "client %d pauses game", buffer[0]);
 
-  tape.pausing = TRUE;
-  DrawVideoDisplay(VIDEO_STATE_PAUSE_ON,0);
+  if (game_status == GAME_MODE_PLAYING)
+  {
+    tape.pausing = TRUE;
+    DrawVideoDisplay(VIDEO_STATE_PAUSE_ON,0);
+  }
 }
 
 static void Handle_OP_CONTINUE_PLAYING()
@@ -654,8 +657,11 @@ static void Handle_OP_CONTINUE_PLAYING()
   printf("OP_CONTINUE_PLAYING: %d\n", buffer[0]);
   Error(ERR_NETWORK_CLIENT, "client %d continues game", buffer[0]);
 
-  tape.pausing = FALSE;
-  DrawVideoDisplay(VIDEO_STATE_PAUSE_OFF,0);
+  if (game_status == GAME_MODE_PLAYING)
+  {
+    tape.pausing = FALSE;
+    DrawVideoDisplay(VIDEO_STATE_PAUSE_OFF,0);
+  }
 }
 
 static void Handle_OP_STOP_PLAYING()