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

- build system update

- compile fix for quests (vector can't be used to store const data)
- fixed several "unitialized" warnings
This commit is contained in:
Ivan Savenko
2012-07-06 20:19:54 +00:00
parent 12511d8fee
commit 50e8bc1704
13 changed files with 64 additions and 32 deletions

View File

@ -1227,7 +1227,7 @@ void CGameState::init(StartInfo * si)
if (chosenBonus.isBonusForHero() && chosenBonus.info1 != 0xFFFE) //exclude generated heroes
{
//find human player
int humanPlayer;
int humanPlayer=GameConstants::NEUTRAL_PLAYER;
for (std::map<ui8, PlayerState>::iterator it=players.begin(); it != players.end(); ++it)
{
if(it->second.human)
@ -1236,6 +1236,8 @@ void CGameState::init(StartInfo * si)
break;
}
}
assert(humanPlayer != GameConstants::NEUTRAL_PLAYER);
std::vector<ConstTransitivePtr<CGHeroInstance> > & heroes = players[humanPlayer].heroes;
if (chosenBonus.info1 == 0xFFFD) //most powerful