(svn r23036) -Fix (r22970): swapped parameters resulted in wrong vehicle names

This commit is contained in:
yexo
2011-10-17 20:28:56 +00:00
parent c3e83edbe5
commit eb30e74578

View File

@@ -5153,7 +5153,7 @@ static void FeatureNewName(ByteReader *buf)
if (!generic) { if (!generic) {
Engine *e = GetNewEngine(_cur.grffile, (VehicleType)feature, id, HasBit(_cur.grfconfig->flags, GCF_STATIC)); Engine *e = GetNewEngine(_cur.grffile, (VehicleType)feature, id, HasBit(_cur.grfconfig->flags, GCF_STATIC));
if (e == NULL) break; if (e == NULL) break;
StringID string = AddGRFString(_cur.grffile->grfid, e->index, lang, false, new_scheme, name, e->info.string_id); StringID string = AddGRFString(_cur.grffile->grfid, e->index, lang, new_scheme, false, name, e->info.string_id);
e->info.string_id = string; e->info.string_id = string;
} else { } else {
AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED); AddGRFString(_cur.grffile->grfid, id, lang, new_scheme, true, name, STR_UNDEFINED);