forked from mirror/OpenTTD
(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:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user