mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-07-08 05:19:48 +01:00
(svn r5359) - Setting a patch value through the console would show the old value as a confirmation. This was caused by the actual action being executed a tick later in multiplayer mode. Simply work around it by not showing the new value. If someone really must now it, just query again.
This commit is contained in:
parent
e2c8ed09a7
commit
a0445ce3a2
10
settings.c
10
settings.c
@ -1600,17 +1600,7 @@ void IConsoleSetPatchSetting(const char *name, const char *value)
|
|||||||
ptr = ini_get_variable(&sd->save, patches_ptr);
|
ptr = ini_get_variable(&sd->save, patches_ptr);
|
||||||
|
|
||||||
SetPatchValue(index, patches_ptr, val);
|
SetPatchValue(index, patches_ptr, val);
|
||||||
val = ReadValue(ptr, sd->save.conv);
|
|
||||||
|
|
||||||
if (sd->desc.proc != NULL) sd->desc.proc(val);
|
if (sd->desc.proc != NULL) sd->desc.proc(val);
|
||||||
|
|
||||||
if (sd->desc.cmd == SDT_BOOLX) {
|
|
||||||
snprintf(newval, sizeof(newval), (val != 0) ? "on" : "off");
|
|
||||||
} else {
|
|
||||||
snprintf(newval, sizeof(newval), "%d", val);
|
|
||||||
}
|
|
||||||
|
|
||||||
IConsolePrintF(_icolour_warn, "'%s' changed to: %s", name, newval);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void IConsoleGetPatchSetting(const char *name)
|
void IConsoleGetPatchSetting(const char *name)
|
||||||
|
Loading…
Reference in New Issue
Block a user