(svn r12819) -Codechange: handle more NewGRFs in the same way as TTDP does it, i.e. testing the low bits for 0xFF or 0 instead of all bits.

This commit is contained in:
rubidium
2008-04-21 14:33:33 +00:00
parent bbe13a0623
commit e947fde701
9 changed files with 16 additions and 53 deletions

View File

@@ -527,7 +527,7 @@ bool NewHouseTileLoop(TileIndex tile)
/* Check callback 21, which determines if a house should be destroyed. */
if (HasBit(hs->callback_mask, CBM_HOUSE_DESTRUCTION)) {
uint16 callback_res = GetHouseCallback(CBID_HOUSE_DESTRUCTION, 0, 0, GetHouseType(tile), GetTownByTile(tile), tile);
if (callback_res != CALLBACK_FAILED && callback_res > 0) {
if (callback_res != CALLBACK_FAILED && GB(callback_res, 0, 8) > 0) {
ClearTownHouse(GetTownByTile(tile), tile);
return false;
}