X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fgame.c;h=99540b18d9622ef055a0066d41c7e32f8dbb53d6;hp=9197a84aabf755f9e049e39f81ec22827612d20d;hb=1b4dc75992f4992654cf9ae5da9e525cb676345b;hpb=9f40d091d5c9e5104fa90c881b6cb8ab8470d71d diff --git a/src/game.c b/src/game.c index 9197a84a..99540b18 100644 --- a/src/game.c +++ b/src/game.c @@ -3358,14 +3358,15 @@ void InitGame(void) else FadeSetEnterScreen(); - if (CheckIfGlobalBorderOrPlayfieldViewportHasChanged()) + if (CheckFadeAll()) fade_mask = REDRAW_ALL; FadeLevelSoundsAndMusic(); ExpireSoundLoops(TRUE); - FadeOut(fade_mask); + if (!level_editor_test_game) + FadeOut(fade_mask); // needed if different viewport properties defined for playing ChangeViewportPropertiesIfNeeded(); @@ -4503,7 +4504,7 @@ void GameWon(void) int i; // do not start end game actions before the player stops moving (to exit) - if (local_player->MovPos) + if (local_player->active && local_player->MovPos) return; game.LevelSolved_GameWon = TRUE; @@ -12164,7 +12165,8 @@ void GameActions_RND(void) DrawAllPlayers(); PlayAllPlayersSound(); - if (local_player->show_envelope != 0 && local_player->MovPos == 0) + if (local_player->show_envelope != 0 && (!local_player->active || + local_player->MovPos == 0)) { ShowEnvelope(local_player->show_envelope - EL_ENVELOPE_1); @@ -13451,6 +13453,9 @@ void RemovePlayer(struct PlayerInfo *player) player->present = FALSE; player->active = FALSE; + // required for some CE actions (even if the player is not active anymore) + player->MovPos = 0; + if (!ExplodeField[jx][jy]) StorePlayer[jx][jy] = 0; @@ -14973,7 +14978,12 @@ void RequestQuitGameExt(boolean skip_request, boolean quick_quit, char *message) { // closing door required in case of envelope style request dialogs if (!skip_request) + { + // prevent short reactivation of overlay buttons while closing door + SetOverlayActive(FALSE); + CloseDoor(DOOR_CLOSE_1); + } if (network.enabled) SendToServer_StopPlaying(NETWORK_STOP_BY_PLAYER);