@@ -180,25 +180,25 @@ int32 CmdInsertOrder(TileIndex tile, uin
if (v->type == 0 || !CheckOwnership(v->owner)) return CMD_ERROR;
/* Check if the inserted order is to the correct destination (owner, type),
* and has the correct flags if any */
switch (new_order.type) {
case OT_GOTO_STATION: {
const Station *st;
if (!IsStationIndex(new_order.station)) return CMD_ERROR;
st = GetStation(new_order.station);
if (!IsValidStation(st) ||
(st->airport_type != AT_OILRIG && !(IsBuoy(st)) && !CheckOwnership(st->owner))) {
(st->airport_type != AT_OILRIG && !IsBuoy(st) && !CheckOwnership(st->owner))) {
return CMD_ERROR;
}
switch (v->type) {
case VEH_Train:
if (!(st->facilities & FACIL_TRAIN)) return CMD_ERROR;
break;
case VEH_Road:
if (v->cargo_type == CT_PASSENGERS) {
if (!(st->facilities & FACIL_BUS_STOP)) return CMD_ERROR;
} else {