fixed drawing pause button on closed door when restarting paused game
authorHolger Schemel <info@artsoft.org>
Sun, 18 Feb 2024 13:29:23 +0000 (14:29 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 18 Feb 2024 13:29:54 +0000 (14:29 +0100)
src/game.c

index d1bf2d7d0f2a334760196aab48140344b55d1ba2..872b4e9b2b769f61906a6063006cfd0b1a5f51e8 100644 (file)
@@ -16473,6 +16473,10 @@ void ModifyPauseButtons(void)
   };
   int i;
 
+  // do not redraw pause button on closed door (may happen when restarting game)
+  if (!(GetDoorState() & DOOR_OPEN_1))
+    return;
+
   for (i = 0; ids[i] > -1; i++)
     ModifyGadget(game_gadget[ids[i]], GDI_CHECKED, tape.pausing, GDI_END);
 }