(svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned
authortron
Sat, 08 Apr 2006 14:18:39 +0000
changeset 3481 5425ba1d135a
parent 3480 a36c0220b5d3
child 3482 ba2072e463c8
(svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned
roadveh_cmd.c
--- a/roadveh_cmd.c	Sat Apr 08 13:58:19 2006 +0000
+++ b/roadveh_cmd.c	Sat Apr 08 14:18:39 2006 +0000
@@ -1600,7 +1600,7 @@
 	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);