# HG changeset patch # User rubidium # Date 1184246706 0 # Node ID dd2088b84cd23b756a41d9d0b14e7b617df7812e # Parent 48ab549d50c9df675b2290c7be9e9b8d04efac48 (svn r10521) -Fix: some NewGRFs did not check whether the newindustries bit was set, which breaks with a not-yet-finished-implementation of newindustries. diff -r 48ab549d50c9 -r dd2088b84cd2 src/newgrf.cpp --- a/src/newgrf.cpp Thu Jul 12 09:15:57 2007 +0000 +++ b/src/newgrf.cpp Thu Jul 12 13:25:06 2007 +0000 @@ -1681,6 +1681,8 @@ 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 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 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 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);