Changeset - r16094:73ebc3170625
[Not reviewed]
master
0 2 0
yexo - 14 years ago 2010-09-13 13:27:29
yexo@openttd.org
(svn r20797) -Fix: disable houses without a size that are available according to their building flags
2 files changed with 9 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/house.h
Show inline comments
 
@@ -80,7 +80,8 @@ enum HouseZones {                  ///< 
 
	HZ_TEMP              = 0x1000,  ///< 12   1000        can appear in temperate climate
 
	HZ_SUBARTC_BELOW     = 0x2000,  ///< 13   2000        can appear in sub-arctic climate below the snow line
 
	HZ_SUBTROPIC         = 0x4000,  ///< 14   4000        can appear in subtropical climate
 
	HZ_TOYLND            = 0x8000   ///< 15   8000        can appear in toyland climate
 
	HZ_TOYLND            = 0x8000,  ///< 15   8000        can appear in toyland climate
 
	HZ_CLIMALL           = 0xF800,  ///< Bitmask of all climate bits
 
};
 
DECLARE_ENUM_AS_BIT_SET(HouseZones)
 

	
src/newgrf.cpp
Show inline comments
 
@@ -7318,6 +7318,13 @@ static bool IsHouseSpecValid(HouseSpec *
 
		return false;
 
	}
 

	
 
	/* Make sure that additional parts of multitile houses are not available. */
 
	if ((hs->building_flags & BUILDING_HAS_1_TILE) == 0 && (hs->building_availability & HZ_ZONALL) != 0 && (hs->building_availability & HZ_CLIMALL) != 0) {
 
		hs->enabled = false;
 
		if (filename != NULL) DEBUG(grf, 1, "FinaliseHouseArray: %s defines house %d without a size but marked it as available. Disabling house.", filename, hs->grf_prop.local_id);
 
		return false;
 
	}
 

	
 
	return true;
 
}
 

	
0 comments (0 inline, 0 general)