mirror of https://github.com/OpenTTD/OpenTTD
(svn r18007) -Codechange: No need to call CB 36 'running cost factor' if the vehicle has no running cost class anyway.
parent
a6b362ff83
commit
e781929d7f
|
@ -4436,6 +4436,7 @@ Money Train::GetRunningCost() const
|
||||||
|
|
||||||
do {
|
do {
|
||||||
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
|
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);
|
byte cost_factor = GetVehicleProperty(v, PROP_TRAIN_RUNNING_COST_FACTOR, rvi->running_cost);
|
||||||
if (cost_factor == 0) continue;
|
if (cost_factor == 0) continue;
|
||||||
|
|
Loading…
Reference in New Issue