summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2004-12-27 18:18:44 +0000
committertruelight <truelight@openttd.org>2004-12-27 18:18:44 +0000
commitc0eeb710c79a29e1dbfc455abe5b1ad76479c8de (patch)
tree1bdcb08fe5cc2a1ad68d905888ce36d7f3a7cc14 /roadveh_cmd.c
parent36fb04215e7004420cab2e71f2fd6fabcc4c4a1d (diff)
downloadopenttd-c0eeb710c79a29e1dbfc455abe5b1ad76479c8de.tar.xz
(svn r1283) -Add: AutoRenew is now a client-side patch instead of a game-side patch
Note: this is the first commit that breaks compatibility with 0.3.5! -Fix: Bufferoverflow with autorenew_money. It is now a 32-bit integer.
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 38c6583b8..c72416160 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -100,7 +100,7 @@ void DrawRoadVehEngineInfo(int engine, int x, int y, int maxw)
DrawStringMultiCenter(x, y, STR_902A_COST_SPEED_RUNNING_COST, maxw);
}
-static int32 EstimateRoadVehCost(byte engine_type)
+int32 EstimateRoadVehCost(byte engine_type)
{
return ((_price.roadveh_base >> 3) * RoadVehInfo(engine_type)->base_cost) >> 5;
}
@@ -1379,7 +1379,7 @@ void RoadVehEnterDepot(Vehicle *v)
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- MaybeRenewVehicle(v, EstimateRoadVehCost(v->engine_type));
+ MaybeRenewVehicle(v);
VehicleServiceInDepot(v);