summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-09-19 21:44:01 +0000
committerdominik <dominik@openttd.org>2004-09-19 21:44:01 +0000
commite0d671ab5f8188cfb396288332c3b302fe43500b (patch)
tree60b50780df2d3bcb8d731aef7b7b41643c91e8f0
parent72bd3bd17098a9073d26e6cb13e5a7ab4e6e92af (diff)
downloadopenttd-e0d671ab5f8188cfb396288332c3b302fe43500b.tar.xz
(svn r300) Fix: order checker now correctly detects station with invalid facilities
-rw-r--r--order_cmd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/order_cmd.c b/order_cmd.c
index 3496e9c72..a411a411e 100644
--- a/order_cmd.c
+++ b/order_cmd.c
@@ -392,6 +392,7 @@ int CheckOrders(Vehicle *v)
n_st++;
st = DEREF_STATION(order >> 8);
required_tile = GetStationTileForVehicle(v,st);
+ if (!required_tile) problem_type = 3;
}
old_order = order; //store the old order
}
@@ -404,8 +405,6 @@ int CheckOrders(Vehicle *v)
if (n_st < 2) problem_type = 0;
- if (!required_tile) problem_type = 3;
-
SET_DPARAM16(0, v->unitnumber);
message = (STR_TRAIN_HAS_TOO_FEW_ORDERS) + (((v->type) - VEH_Train) << 2) + problem_type;