(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 96b36ec01e
commit 8dcbf2675b
10 changed files with 116 additions and 71 deletions

View File

@@ -364,7 +364,7 @@ static const byte _railveh_score[] = {
};
static int32 EstimateTrainCost(const RailVehicleInfo *rvi)
int32 EstimateTrainCost(const RailVehicleInfo *rvi)
{
return (rvi->base_cost * (_price.build_railvehicle >> 3)) >> 5;
}
@@ -2618,7 +2618,7 @@ void TrainEnterDepot(Vehicle *v, uint tile)
v->load_unload_time_rem = 0;
v->cur_speed = 0;
MaybeRenewVehicle(v, EstimateTrainCost(RailVehInfo(v->engine_type)));
MaybeRenewVehicle(v);
TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT);