(svn r14545) -Fix [FS#2386]: road vehicles sometimes never got their "slots" deallocated causing RVs not going to depot for service.
authorrubidium
Tue, 28 Oct 2008 23:34:42 +0000
changeset 10302 8d4bdf14adb4
parent 10301 76966696a338
child 10303 d3ec9842c33c
(svn r14545) -Fix [FS#2386]: road vehicles sometimes never got their "slots" deallocated causing RVs not going to depot for service.
src/roadveh_cmd.cpp
--- a/src/roadveh_cmd.cpp	Tue Oct 28 16:04:41 2008 +0000
+++ b/src/roadveh_cmd.cpp	Tue Oct 28 23:34:42 2008 +0000
@@ -1796,7 +1796,10 @@
 		return false;
 	}
 
-	if (v->current_order.IsType(OT_LEAVESTATION) && IsDriveThroughStopTile(v->tile)) v->current_order.Free();
+	if (v->current_order.IsType(OT_LEAVESTATION) && IsDriveThroughStopTile(v->tile)) {
+		v->current_order.Free();
+		ClearSlot(v);
+	}
 
 	/* Move to next frame unless vehicle arrived at a stop position
 	 * in a depot or entered a tunnel/bridge */