src/order_cmd.cpp
changeset 8919 403ddceeb879
parent 8911 e986cdff87a7
child 8926 888a242c523f
--- a/src/order_cmd.cpp	Sun Apr 13 16:50:55 2008 +0000
+++ b/src/order_cmd.cpp	Sun Apr 13 16:54:19 2008 +0000
@@ -358,7 +358,7 @@
 			}
 
 			/* Non stop not allowed for non-trains. */
-			if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && v->type != VEH_TRAIN) return CMD_ERROR;
+			if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && v->type != VEH_TRAIN && v->type != VEH_ROAD) return CMD_ERROR;
 
 			/* Full load and unload are mutual exclusive. */
 			if ((new_order.GetLoadType() & OLFB_FULL_LOAD) && (new_order.GetUnloadType() & OUFB_UNLOAD)) return CMD_ERROR;
@@ -412,7 +412,7 @@
 				if (!IsPlayerBuildableVehicleType(v)) return CMD_ERROR;
 			}
 
-			if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && v->type != VEH_TRAIN) return CMD_ERROR;
+			if (new_order.GetNonStopType() != ONSF_STOP_EVERYWHERE && v->type != VEH_TRAIN && v->type != VEH_ROAD) return CMD_ERROR;
 			if (new_order.GetDepotOrderType() & ~ODTFB_PART_OF_ORDERS) return CMD_ERROR;
 			if (new_order.GetDepotActionType() & ~ODATFB_NEAREST_DEPOT) return CMD_ERROR;
 			break;
@@ -869,6 +869,7 @@
 		default: NOT_REACHED();
 
 		case MOF_NON_STOP:
+			if (v->type != VEH_TRAIN && v->type != VEH_ROAD) return CMD_ERROR;
 			if (data >= ONSF_END) return CMD_ERROR;
 			if (data == order->GetNonStopType()) return CMD_ERROR;
 			break;