1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-29 00:41:38 +02:00

- game won't crash on missing dwellings (instead random one will generated)

- added disabled code that can be used to fix buildings blit order
- minor fixes
This commit is contained in:
Ivan Savenko
2012-10-07 14:58:48 +00:00
parent b3f317c1ed
commit db10f512d5
4 changed files with 38 additions and 3 deletions

View File

@ -636,7 +636,12 @@ std::pair<int,int> CGameState::pickObject (CGObjectInstance *obj)
result = std::pair<int,int>(17, iter.first);
if (result.first == -1)
{
tlog0 << "Error: failed to find creature for dwelling of "<< int(faction) << " of level " << int(level) << "\n";
auto iter = VLC->objh->cregens.begin();
std::advance(iter, ran() % VLC->objh->cregens.size() );
result = std::pair<int, int>(17, iter->first);
}
return result;
}