forked from mirror/OpenTTD
(svn r3388) - NewGRF: Allow train running cost class to differ from engine class. Also fix typo in r3384.
This commit is contained in:
@@ -3601,9 +3601,9 @@ int32 GetTrainRunningCost(const Vehicle *v)
|
||||
|
||||
do {
|
||||
const RailVehicleInfo *rvi = RailVehInfo(v->engine_type);
|
||||
if (rvi->running_cost_base)
|
||||
cost += rvi->running_cost_base * _price.running_rail[rvi->engclass];
|
||||
} while ( (v=v->next) != NULL );
|
||||
if (rvi->running_cost_base > 0)
|
||||
cost += rvi->running_cost_base * _price.running_rail[rvi->running_cost_class];
|
||||
} while ((v = v->next) != NULL);
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
Reference in New Issue
Block a user