(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is

no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
This commit is contained in:
peter1138
2008-01-12 19:58:06 +00:00
parent 74f9be8f2c
commit 0f7392bd61
38 changed files with 250 additions and 298 deletions

View File

@@ -3170,7 +3170,8 @@ static void FeatureNewName(byte *buf, int len)
case GSF_AIRCRAFT:
if (id < TOTAL_NUM_ENGINES) {
StringID string = AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, STR_8000_KIRBY_PAUL_TANK_STEAM + id);
SetCustomEngineName(id, string);
EngineInfo *ei = &_engine_info[id];
ei->string_id = string;
} else {
AddGRFString(_cur_grffile->grfid, id, lang, new_scheme, name, id);
}
@@ -5014,7 +5015,6 @@ static void ResetNewGRFData()
/* Unload sprite group data */
UnloadWagonOverrides();
UnloadCustomEngineSprites();
UnloadCustomEngineNames();
ResetEngineListOrder();
/* Reset price base data */