(svn r13371) -Fix (r4510 ... r12924): Engine array size is not related to the ID used when setting a vehicle's name (it is vehicle type specific). Instead just test for a generic string.

replace/41b28d7194a279bdc17475d4fbe2ea6ec885a466
peter1138 17 years ago
parent 1ddfdda02c
commit 7b75cee876

@ -3302,7 +3302,7 @@ static void FeatureNewName(byte *buf, size_t len)
case GSF_ROAD:
case GSF_SHIP:
case GSF_AIRCRAFT:
if (id < GetEnginePoolSize()) {
if (!generic) {
Engine *e = GetNewEngine(_cur_grffile, (VehicleType)feature, id);
StringID string = AddGRFString(_cur_grffile->grfid, e->index, lang, new_scheme, name, e->info.string_id);
e->info.string_id = string;

Loading…
Cancel
Save