summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-09-30 18:53:59 +0000
committerrubidium <rubidium@openttd.org>2007-09-30 18:53:59 +0000
commit171374a8f0e437dc9ddec018aa4e9291b6fe9d9c (patch)
treee11bc8af1d7cf81fe1d655215c232c24f3ec72d3 /src
parentff14665f6ebde59e8ef17d8f0e06e2d3e5aefd65 (diff)
downloadopenttd-171374a8f0e437dc9ddec018aa4e9291b6fe9d9c.tar.xz
(svn r11189) -Fix: if the location check callback results in something invalid (i.e. not a callback result), the industry should be allowed to be build as that's how TTDP does it.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_industries.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index 8703ab417..abd9be1c5 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -439,7 +439,9 @@ bool CheckIfCallBackAllowsCreation(TileIndex tile, IndustryType type, uint itspe
group = Resolve(GetIndustrySpec(type)->grf_prop.spritegroup, &object);
- if (group == NULL || group->type != SGT_CALLBACK) return false;
+ /* Unlike the "normal" cases, not having a valid result means we allow
+ * the building of the industry, as that's how it's done in TTDP. */
+ if (group == NULL || group->type != SGT_CALLBACK) return true;
switch (group->g.callback.result) {
case 0x400: return true;