summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2009-02-08 18:29:22 +0000
committerpeter1138 <peter1138@openttd.org>2009-02-08 18:29:22 +0000
commit68e641e9eda945c76c718a25a9c96f638bece43b (patch)
treeaa728eb907f532c9d93c726670b54e64ce41f7b1
parenta68e0ee42f03bb48efbe91a7c6354e4561644ad4 (diff)
downloadopenttd-68e641e9eda945c76c718a25a9c96f638bece43b.tar.xz
(svn r15418) -Codechange: Add action7/9 support to detect available rail type labels
-rw-r--r--src/newgrf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index baed23f6f..f7d50f66b 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -4072,6 +4072,10 @@ static void SkipIf(byte *buf, size_t len)
break;
case 0x0C: result = GetCargoIDByLabel(BSWAP32(cond_val)) != CT_INVALID;
break;
+ case 0x0D: result = GetRailTypeByLabel(BSWAP32(cond_val)) == INVALID_RAILTYPE;
+ break;
+ case 0x0E: result = GetRailTypeByLabel(BSWAP32(cond_val)) != INVALID_RAILTYPE;
+ break;
default: grfmsg(1, "SkipIf: Unsupported condition type %02X. Ignoring", condtype); return;
}
@@ -5491,6 +5495,7 @@ static void ResetNewGRF()
free(f->filename);
free(f->cargo_list);
+ free(f->railtype_list);
free(f);
}