(svn r18007) -Codechange: No need to call CB 36 'running cost factor' if the vehicle has no running cost class anyway.

This commit is contained in:
frosch 2009-11-08 12:18:59 +00:00
parent a6b362ff83
commit e781929d7f

View File

@ -4436,6 +4436,7 @@ Money Train::GetRunningCost() const
do {
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
if (rvi->running_cost_class == INVALID_PRICE) continue;
byte cost_factor = GetVehicleProperty(v, PROP_TRAIN_RUNNING_COST_FACTOR, rvi->running_cost);
if (cost_factor == 0) continue;