roadveh_cmd.c
changeset 4526 6d48f07e829e
parent 4519 f53d829de680
child 4527 fa30d19685c2
--- a/roadveh_cmd.c	Sat Sep 02 21:52:06 2006 +0000
+++ b/roadveh_cmd.c	Sat Sep 02 22:47:45 2006 +0000
@@ -380,6 +380,8 @@
 
 	if (v->vehstatus & VS_CRASHED) return CMD_ERROR;
 
+	if (IsRoadVehInDepot(v)) return CMD_ERROR;
+
 	/* If the current orders are already goto-depot */
 	if (v->current_order.type == OT_GOTO_DEPOT) {
 		if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {