mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-13 07:10:57 +00:00
(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:
parent
a6b362ff83
commit
e781929d7f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user