(svn r16393) -Codechange: move VehicleRail to Train.

This commit is contained in:
rubidium
2009-05-22 22:55:41 +00:00
parent c4b627af42
commit da5661a0c8
18 changed files with 136 additions and 136 deletions

View File

@@ -1424,7 +1424,7 @@ SpriteID GetEnginePalette(EngineID engine_type, CompanyID company)
SpriteID GetVehiclePalette(const Vehicle *v)
{
if (v->type == VEH_TRAIN) {
return GetEngineColourMap(v->engine_type, v->owner, v->u.rail.first_engine, v);
return GetEngineColourMap(v->engine_type, v->owner, ((Train *)v)->tcache.first_engine, v);
} else if (v->type == VEH_ROAD) {
return GetEngineColourMap(v->engine_type, v->owner, ((RoadVehicle *)v)->first_engine, v);
}