summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-09-20 19:09:06 +0000
committerdominik <dominik@openttd.org>2004-09-20 19:09:06 +0000
commit0ba58f25a46e3ccf3cba777d922c94f2f73b542b (patch)
tree5e309fc99db87245b30f73233fbbf2ec35869902
parent807da4e72285e73b8300ae5ea2ed005c9bb47b04 (diff)
downloadopenttd-0ba58f25a46e3ccf3cba777d922c94f2f73b542b.tar.xz
(svn r303) Fix: [ 1022227 ] Ships could unload cargo at stations without docks
-rw-r--r--ship_cmd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ship_cmd.c b/ship_cmd.c
index 6dba5721c..2877939fb 100644
--- a/ship_cmd.c
+++ b/ship_cmd.c
@@ -663,8 +663,10 @@ static void ShipController(Vehicle *v)
v->last_station_visited = v->next_order_param;
+ /* Process station in the schedule. Don't do that for buoys (HVOT_BUOY) */
st = DEREF_STATION(v->next_order_param);
- 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->next_order = (v->next_order & (OF_FULL_LOAD|OF_UNLOAD)) | OF_NON_STOP | OT_LOADING;
ShipArrivesAt(v, st);
@@ -674,7 +676,7 @@ static void ShipController(Vehicle *v)
MarkShipDirty(v);
}
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, 4);
- } else {
+ } else { /* leave buoys right aways */
v->next_order = OT_LEAVESTATION;
v->cur_order_index++;
InvalidateVehicleOrderWidget(v);