1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-18 20:19:11 +00:00

(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.

This commit is contained in:
2008-02-21 19:09:10 +00:00
parent c0544563a6
commit dda6cab17a
10 changed files with 199 additions and 152 deletions

View File

@@ -3577,7 +3577,7 @@ Money Train::GetRunningCost() const
byte cost_factor = GetVehicleProperty(v, 0x0D, rvi->running_cost);
if (cost_factor == 0) continue;
cost += cost_factor * _price.running_rail[rvi->running_cost_class];
cost += cost_factor * GetPriceByIndex(rvi->running_cost_class);
} while ((v = GetNextVehicle(v)) != NULL);
return cost;