(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.

pull/155/head
peter1138 16 years ago
parent a315054443
commit 76bae9f8dd

@ -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