(svn r23075) -Codechange: Add GetGRF() and GetGRFID() methods to Engine and Vehicle to simplify code.

This commit is contained in:
frosch
2011-11-01 00:23:41 +00:00
parent 72cd855978
commit acc3c75951
17 changed files with 84 additions and 64 deletions

View File

@@ -1533,7 +1533,7 @@ Money RoadVehicle::GetRunningCost() const
uint cost_factor = GetVehicleProperty(this, PROP_ROADVEH_RUNNING_COST_FACTOR, e->u.road.running_cost);
if (cost_factor == 0) return 0;
return GetPrice(e->u.road.running_cost_class, cost_factor, e->grf_prop.grffile);
return GetPrice(e->u.road.running_cost_class, cost_factor, e->GetGRF());
}
bool RoadVehicle::Tick()