From ab8382c0db353d9d1ba6b7a9690d56aa2415258c Mon Sep 17 00:00:00 2001 From: peter1138 Date: Sat, 12 Jan 2008 19:58:06 +0000 Subject: (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. --- src/newgrf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/newgrf.cpp') diff --git a/src/newgrf.cpp b/src/newgrf.cpp index acccbf467..d1006667b 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -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 */ -- cgit v1.2.3-54-g00ecf