1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-13 01:20:34 +02:00

Merged fixes from the branch.

This commit is contained in:
Michał W. Urbańczyk
2013-09-28 00:58:33 +00:00
20 changed files with 167 additions and 61 deletions

View File

@ -634,6 +634,17 @@ public:
h & town & townAndVis;
BONUS_TREE_DESERIALIZATION_FIX
vstd::erase_if(builtBuildings, [this](BuildingID building) -> bool
{
if(!town->buildings.count(building) || !town->buildings.at(building))
{
logGlobal->errorStream() << boost::format("#1444-like issue in CGTownInstance::serialize. From town %s at %s removing the bogus builtBuildings item %s")
% name % pos % building;
return true;
}
return false;
});
}
//////////////////////////////////////////////////////////////////////////