1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-09-02 11:29:10 +00:00

(svn r15412) -Fix: Clearing custom engine names could cause desyncs due to be client-side only; GUI parts of save/load of custom engine names also removed as it was never implemented.

This commit is contained in:
2009-02-08 12:58:14 +00:00
parent dcb3a9ac51
commit 748d4d2fb9
4 changed files with 8 additions and 81 deletions

View File

@@ -256,23 +256,6 @@ void SetupEngines()
void ShowEnginePreviewWindow(EngineID engine);
void DeleteCustomEngineNames()
{
Engine *e;
FOR_ALL_ENGINES(e) {
free(e->name);
e->name = NULL;
}
_vehicle_design_names &= ~1;
}
void LoadCustomEngineNames()
{
/* XXX: not done */
DEBUG(misc, 1, "LoadCustomEngineNames: not done");
}
/* Determine if an engine type is a wagon (and not a loco) */
static bool IsWagon(EngineID index)
{
@@ -615,17 +598,8 @@ CommandCost CmdRenameEngine(TileIndex tile, uint32 flags, uint32 p1, uint32 p2,
if (reset) {
e->name = NULL;
/* if we removed the last custom name, disable the 'Save custom names' button */
_vehicle_design_names &= ~1;
FOR_ALL_ENGINES(e) {
if (e->name != NULL) {
_vehicle_design_names |= 1;
break;
}
}
} else {
e->name = strdup(text);
_vehicle_design_names |= 3;
}
MarkWholeScreenDirty();