(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.

This commit is contained in:
frosch
2010-06-05 12:16:12 +00:00
parent 60fb3bb9a5
commit a5bea603ea
17 changed files with 62 additions and 44 deletions

View File

@@ -516,7 +516,7 @@ static void TileLoop_Town(TileIndex tile)
}
}
Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN);
Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
if ((hs->building_flags & BUILDING_HAS_1_TILE) &&
HasBit(t->flags, TOWN_IS_FUNDED) &&
@@ -1297,7 +1297,7 @@ static bool GrowTown(Town *t)
};
/* Current "company" is a town */
Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN);
Backup<CompanyByte> cur_company(_current_company, OWNER_TOWN, FILE_LINE);
TileIndex tile = t->xy; // The tile we are working with ATM
@@ -2383,7 +2383,7 @@ static bool DoBuildStatueOfCompany(TileIndex tile, TownID town_id)
return false;
}
Backup<CompanyByte> cur_company(_current_company, OWNER_NONE);
Backup<CompanyByte> cur_company(_current_company, OWNER_NONE, FILE_LINE);
CommandCost r = DoCommand(tile, 0, 0, DC_EXEC, CMD_LANDSCAPE_CLEAR);
cur_company.Restore();