diff options
author | truelight <truelight@openttd.org> | 2004-12-27 18:18:44 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-12-27 18:18:44 +0000 |
commit | 8dcbf2675b784ac3a060c046c10dc393c52f2772 (patch) | |
tree | 1bdcb08fe5cc2a1ad68d905888ce36d7f3a7cc14 /ship_cmd.c | |
parent | 96b36ec01eda43cd8e4efedaf8e9249e9597403f (diff) | |
download | openttd-8dcbf2675b784ac3a060c046c10dc393c52f2772.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 'ship_cmd.c')
-rw-r--r-- | ship_cmd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ship_cmd.c b/ship_cmd.c index a75074d1a..8b2879b7e 100644 --- a/ship_cmd.c +++ b/ship_cmd.c @@ -387,7 +387,7 @@ static bool ShipAccelerate(Vehicle *v) } -static int32 EstimateShipCost(uint16 engine_type); +int32 EstimateShipCost(uint16 engine_type); static void ShipEnterDepot(Vehicle *v) { @@ -400,7 +400,7 @@ static void ShipEnterDepot(Vehicle *v) InvalidateWindow(WC_VEHICLE_DETAILS, v->index); - MaybeRenewVehicle(v, EstimateShipCost(v->engine_type)); + MaybeRenewVehicle(v); TriggerVehicle(v, VEHICLE_TRIGGER_DEPOT); @@ -680,7 +680,7 @@ static void ShipController(Vehicle *v) /* Process station in the schedule. Don't do that for buoys (HVOT_BUOY) */ st = DEREF_STATION(v->current_order.station); - if (!(st->had_vehicle_of_type & HVOT_BUOY) + if (!(st->had_vehicle_of_type & HVOT_BUOY) && (st->facilities & FACIL_DOCK)) { /* ugly, ugly workaround for problem with ships able to drop off cargo at wrong stations */ v->current_order.type = OT_LOADING; v->current_order.flags &= OF_FULL_LOAD | OF_UNLOAD; @@ -796,7 +796,7 @@ void ShipsYearlyLoop() } } -static int32 EstimateShipCost(uint16 engine_type) +int32 EstimateShipCost(uint16 engine_type) { return ShipVehInfo(engine_type)->base_cost * (_price.ship_base>>3)>>5; } |