# HG changeset patch # User Darkvater # Date 2006-03-16 00:22:36 # Node ID 7147fc6c2479d13b52653f471ea08a00a52b6b9f # Parent 303ed792a93647110797dadada77fb4bb1995422 (svn r3896) - [Patches] Fix: Honour any conditional settings when retrieving the setting entries. diff --git a/settings.c b/settings.c --- a/settings.c +++ b/settings.c @@ -1384,6 +1384,7 @@ int32 CmdChangePatchSetting(int x, int y const SettingDesc *sd = GetSettingDescription(p1); if (sd == NULL) return CMD_ERROR; + if (!SlIsObjectCurrentlyValid(sd->save.version_from, sd->save.version_to)) return CMD_ERROR; if (flags & DC_EXEC) { Patches *patches_ptr = (_game_mode == GM_MENU) ? &_patches_newgame : &_patches; @@ -1428,6 +1429,7 @@ static const SettingDesc *GetPatchFromNa const SettingDesc *sd; for (*i = 0, sd = _patch_settings; sd->save.cmd != SL_END; sd++, (*i)++) { + if (!SlIsObjectCurrentlyValid(sd->save.version_from, sd->save.version_to)) continue; if (strcmp(sd->desc.name, name) == 0) return sd; }