Changeset - r3223:7147fc6c2479
[Not reviewed]
master
0 1 0
Darkvater - 18 years ago 2006-03-16 00:22:36
darkvater@openttd.org
(svn r3896) - [Patches] Fix: Honour any conditional settings when retrieving the setting entries.
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
settings.c
Show inline comments
 
@@ -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;
 
	}
 

	
0 comments (0 inline, 0 general)