summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-07-12 13:25:06 +0000
committerrubidium <rubidium@openttd.org>2007-07-12 13:25:06 +0000
commit6f0db273d649b5f607f4e3fc85c93945169fb9a2 (patch)
treeaf91633925624a85b169908e9b53a303368d9645 /src
parent07a1d4379e3694e2302c32eaf044d282e14cfd4f (diff)
downloadopenttd-6f0db273d649b5f607f4e3fc85c93945169fb9a2.tar.xz
(svn r10521) -Fix: some NewGRFs did not check whether the newindustries bit was set, which breaks with a not-yet-finished-implementation of newindustries.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 7afed1eea..6c74edc0a 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -1681,6 +1681,8 @@ static bool SoundEffectChangeInfo(uint sid, int numinfo, int prop, byte **bufp,
static bool IndustrytilesChangeInfo(uint indtid, int numinfo, int prop, byte **bufp, int len)
{
+ if (!HASBIT(_ttdpatch_flags[3], 0x07)) return true;
+
byte *buf = *bufp;
bool ret = false;
@@ -1793,6 +1795,8 @@ static bool IndustrytilesChangeInfo(uint indtid, int numinfo, int prop, byte **b
static bool IndustriesChangeInfo(uint indid, int numinfo, int prop, byte **bufp, int len)
{
+ if (!HASBIT(_ttdpatch_flags[3], 0x07)) return true;
+
byte *buf = *bufp;
bool ret = false;
@@ -2923,6 +2927,8 @@ static void TownHouseMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
static void IndustryMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
{
+ if (!HASBIT(_ttdpatch_flags[3], 0x07)) return;
+
byte *bp = &buf[4 + idcount + cidcount * 3];
uint16 groupid = grf_load_word(&bp);
@@ -2947,6 +2953,8 @@ static void IndustryMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
static void IndustrytileMapSpriteGroup(byte *buf, uint8 idcount, uint8 cidcount)
{
+ if (!HASBIT(_ttdpatch_flags[3], 0x07)) return;
+
byte *bp = &buf[4 + idcount + cidcount * 3];
uint16 groupid = grf_load_word(&bp);