From: DeaDDooMER Date: Wed, 27 Sep 2023 07:07:01 +0000 (+0300) Subject: saves: fix game mode on load X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=63889e5f1141ac723de31ad23d8d3ca88438a76c;p=d2df-sdl.git saves: fix game mode on load --- diff --git a/src/game/g_saveload.pas b/src/game/g_saveload.pas index 6b01c06..f311bb8 100644 --- a/src/game/g_saveload.pas +++ b/src/game/g_saveload.pas @@ -375,30 +375,17 @@ begin ///// ///// // Çàãðóæàåì êàðòó: - ZeroMemory(@gGameSettings, sizeof(TGameSettings)); + gGameSettings := Default(TGameSettings); gAimLine := false; gShowMap := false; - if (Game_Type = GT_NONE) or (Game_Type = GT_SINGLE) then - begin - // Íàñòðîéêè èãðû - gGameSettings.GameType := GT_SINGLE; - gGameSettings.MaxLives := 0; - gGameSettings.Options := gGameSettings.Options+GAME_OPTION_ALLOWEXIT; - gGameSettings.Options := gGameSettings.Options+GAME_OPTION_MONSTERS; - gGameSettings.Options := gGameSettings.Options+GAME_OPTION_BOTVSMONSTER; - gSwitchGameMode := GM_SINGLE; - end - else - begin - // Íàñòðîéêè èãðû - gGameSettings.GameType := GT_CUSTOM; - gGameSettings.GameMode := Game_Mode; - gSwitchGameMode := Game_Mode; - gGameSettings.TimeLimit := Game_TimeLimit; - gGameSettings.ScoreLimit := Game_ScoreLimit; - gGameSettings.MaxLives := IfThen(Game_Mode = GM_CTF, 0, Game_MaxLives); - gGameSettings.Options := Game_Options; - end; + // Íàñòðîéêè èãðû + gGameSettings.GameType := Game_Type; + gGameSettings.GameMode := Game_Mode; + gGameSettings.TimeLimit := Game_TimeLimit; + gGameSettings.ScoreLimit := Game_ScoreLimit; + gGameSettings.MaxLives := Game_MaxLives; + gGameSettings.Options := Game_Options; + gSwitchGameMode := Game_Mode; g_Game_ExecuteEvent('ongamestart'); // Óñòàíîâêà ðàçìåðîâ îêîí èãðîêîâ