Changeset - r20414:612b5fb00359
[Not reviewed]
master
0 1 0
frosch - 11 years ago 2013-06-19 20:03:10
frosch@openttd.org
(svn r25429) -Fix [FS#5603] (r25140): When town creation failed, removing remnants of the construction failed on protected houses.
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
src/newgrf_house.cpp
Show inline comments
 
@@ -532,15 +532,15 @@ void AnimateNewHouseConstruction(TileInd
 
}
 

	
 
bool CanDeleteHouse(TileIndex tile)
 
{
 
	const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile));
 

	
 
	/* Humans are always allowed to remove buildings, as is water and
 
	/* Humans are always allowed to remove buildings, as is water and disasters and
 
	 * anyone using the scenario editor. */
 
	if (Company::IsValidHumanID(_current_company) || _current_company == OWNER_WATER || _current_company == OWNER_NONE) {
 
	if (Company::IsValidHumanID(_current_company) || _current_company == OWNER_WATER || _current_company == OWNER_NONE || _game_mode == GM_EDITOR || _generating_world) {
 
		return true;
 
	}
 

	
 
	if (HasBit(hs->callback_mask, CBM_HOUSE_DENY_DESTRUCTION)) {
 
		uint16 callback_res = GetHouseCallback(CBID_HOUSE_DENY_DESTRUCTION, 0, 0, GetHouseType(tile), Town::GetByTile(tile), tile);
 
		return (callback_res == CALLBACK_FAILED || !ConvertBooleanCallback(hs->grf_prop.grffile, CBID_HOUSE_DENY_DESTRUCTION, callback_res));
0 comments (0 inline, 0 general)