(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:
peter1138
2008-02-21 19:09:10 +00:00
parent 67bf63ddff
commit f6e4dc4d8c
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;