From a5369e13d56aea7ad148b36e90693bc4aa4eb3d5 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Wed, 28 Mar 2012 10:07:16 +0200 Subject: [PATCH] properly disable cheats when loading a saved game so only cheats that were stored are re-enabled --- CHANGELOG.txt | 1 + main/state.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 2297bc3c7..c14dca976 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ D2X-Rebirth Changelog main/movie.c: Call all necessary MVE functions when initializing robot movies to prevent crashes if a robot movie is the first one the program plays main/slew.c: Fix compile-time error when building without editor arch/sdl/jukebox.c, main/songs.c: Allow .flac to be a filename extension for sng file and jukebox +main/state.c: properly disable cheats when loading a saved game so only cheats that were stored are re-enabled 20120324 -------- diff --git a/main/state.c b/main/state.c index 69f3bc9d3..91bc47b45 100644 --- a/main/state.c +++ b/main/state.c @@ -1380,7 +1380,7 @@ int state_restore_all_sub(char *filename, int secret_restore) Difficulty_level = PHYSFSX_readSXE32(fp, swap); // Restore the cheats enabled flag - + game_disable_cheats(); // disable cheats first cheats.enabled = PHYSFSX_readSXE32(fp, swap); Do_appearance_effect = 0; // Don't do this for middle o' game stuff.