changeset 3481:04f480486974 draft

(svn r4326) Only reduce the slot age of a vehicle if it has a slot assigned
author tron <tron@openttd.org>
date Sat, 08 Apr 2006 14:18:39 +0000
parents 9958c9ee9f30
children 901206dd8f9c
files roadveh_cmd.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -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);