summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-10-17 20:29:25 +0000
committeryexo <yexo@openttd.org>2010-10-17 20:29:25 +0000
commit2ac00a16a0fe6ca66af84b1840567ce53c101adb (patch)
tree28a78518a2a7bae12dbf9d7172226b272e30a22f
parent9a5e27219562a79279ae89865876bc97f49315de (diff)
downloadopenttd-2ac00a16a0fe6ca66af84b1840567ce53c101adb.tar.xz
(svn r20979) -Fix: [NewGRF] ignore the variable for action7/9 condition type 0x0D and 0x0E as documented
-rw-r--r--src/newgrf.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 44ec6e3db..9628fce84 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5062,12 +5062,13 @@ static void SkipIf(ByteReader *buf)
/*
* Parameter (variable in specs) 0x88 can only have GRF ID checking
- * conditions, except conditions 0x0B and 0x0C (cargo availability)
- * as those ignore the parameter. So, when the condition type is
- * either of those, the specific variable 0x88 code is skipped, so
- * the "general" code for the cargo availability conditions kicks in.
+ * conditions, except conditions 0x0B, 0x0C (cargo availability) and
+ * 0x0D, 0x0E (Rail type availability) as those ignore the parameter.
+ * So, when the condition type is one of those, the specific variable
+ * 0x88 code is skipped, so the "general" code for the cargo
+ * availability conditions kicks in.
*/
- if (param == 0x88 && condtype != 0x0B && condtype != 0x0C) {
+ if (param == 0x88 && (condtype < 0x0B || condtype > 0x0E)) {
/* GRF ID checks */
GRFConfig *c = GetGRFConfig(cond_val, mask);