Change and simplify algorithm for vehicle repair cost.

This is due to absurdly high repair costs for old vehicles with
old algorithm, due to implicit exponential increases.
Get rid of variable in vehicle struct.
This commit is contained in:
Jonathan G Rennison
2017-01-02 20:21:58 +00:00
parent a71a6ecec2
commit 7ecdebddb3
5 changed files with 6 additions and 26 deletions

View File

@@ -138,7 +138,6 @@ CommandCost CmdBuildVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (value.Succeeded() && flags & DC_EXEC) {
v->unitnumber = unit_num;
v->value = value.GetCost();
v->repair_cost = value.GetCost();
InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile);
InvalidateWindowClassesData(GetWindowClassForVehicleType(type), 0);