summaryrefslogtreecommitdiff
path: root/order_cmd.c
diff options
context:
space:
mode:
authorcelestar <celestar@openttd.org>2005-01-29 19:41:44 +0000
committercelestar <celestar@openttd.org>2005-01-29 19:41:44 +0000
commit752b3f0dd614217d68f361e2d0b2cc599a37c860 (patch)
treefcefcecfa2ec7dd8e9178d5206788bd62dcf3c53 /order_cmd.c
parent885fd2b15c1ae9a1422f82b8bcdd9d1a287c3aa6 (diff)
downloadopenttd-752b3f0dd614217d68f361e2d0b2cc599a37c860.tar.xz
(svn r1721) -Feature: It is now possible to build multiple road stations (up to 8) on
a single station. Thanks to: Truelight for the saveload code, Darkvater and Hackykid for network testing and Tron for proof-reading 1500 lines of diff.
Diffstat (limited to 'order_cmd.c')
-rw-r--r--order_cmd.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/order_cmd.c b/order_cmd.c
index b0e638cb5..480e058ae 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -332,6 +332,12 @@ int32 CmdSkipOrder(int x, int y, uint32 flags, uint32 vehicle_id, uint32 not_use
if (v->type == VEH_Train)
v->u.rail.days_since_order_progr = 0;
+
+ if (v->type == VEH_Road && v->u.road.slot != NULL) {
+ //Clear the slot
+ v->u.road.slot->slot[v->u.road.slotindex] = 0;
+ v->u.road.slot = NULL;
+ }
}
/* NON-stop flag is misused to see if a train is in a station that is
@@ -482,7 +488,7 @@ int32 CmdCloneOrder(int x, int y, uint32 flags, uint32 veh1_veh2, uint32 mode)
FOR_VEHICLE_ORDERS(src, order) {
if (order->type == OT_GOTO_STATION) {
const Station *st = GetStation(order->station);
- required_dst = (dst->cargo_type == CT_PASSENGERS) ? st->bus_tile : st->lorry_tile;
+ required_dst = (dst->cargo_type == CT_PASSENGERS) ? st->bus_stops->xy : st->truck_stops->xy;
/* This station has not the correct road-bay, so we can't copy! */
if (!required_dst)
return CMD_ERROR;