mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-23 14:39:08 +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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user