From 3fcb5c3023a29d12b43c02630750e2bb8b48f319 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 30 Sep 2007 18:53:59 +0000 Subject: (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. --- src/newgrf_industries.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/newgrf_industries.cpp') 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; -- cgit v1.2.3-54-g00ecf