summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-04-08 14:18:39 +0000
committertron <tron@openttd.org>2006-04-08 14:18:39 +0000
commit63e040966edabf1610cb46d0a830ddd46c98e6da (patch)
treeb72f2d47f8fcc9fb85352ea4787d116461dc0193
parent4e577f689af24801cffa4c70b092209bdc5325b2 (diff)
downloadopenttd-63e040966edabf1610cb46d0a830ddd46c98e6da.tar.xz
(svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned
-rw-r--r--roadveh_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index f552136ad..96e3c8099 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1600,7 +1600,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
CheckOrders(v);
//Current slot has expired
- if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot_age-- == 0 && v->u.road.slot != NULL) {
+ if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot != NULL && v->u.road.slot_age-- == 0) {
DEBUG(ms, 2) ("Multistop: Slot expired for vehicle %d (index %d) at stop 0x%x",
v->unitnumber, v->index, v->u.road.slot->xy);
ClearSlot(v);