(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.
This commit is contained in:
truelight
2004-12-27 18:18:44 +00:00
parent 36fb04215e
commit c0eeb710c7
10 changed files with 116 additions and 71 deletions

View File

@@ -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);