DEADSOFTWARE

saves: fix game mode on load
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Wed, 27 Sep 2023 07:07:01 +0000 (10:07 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Wed, 27 Sep 2023 07:07:01 +0000 (10:07 +0300)
src/game/g_saveload.pas

index 6b01c06f17717f5da54bff9f796cb9edb84dcbef..f311bb8f5a89ad8429c34646818c1d32d4ec1b87 100644 (file)
@@ -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');
 
         // Óñòàíîâêà ðàçìåðîâ îêîí èãðîêîâ