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

CGSubterraneanGate: fix pairing and always assign all gates to channel

Before gates on underground layer didn't had any channel assigned and of course any function that attempt to check -1 channel caused crash.
Also I find out that at point postInit executed It's possible to get mutable gamestate via gameState() callback so we don't need to pass it there.
This commit is contained in:
ArseniyShestakov
2015-03-11 17:17:21 +03:00
parent f3cdadf142
commit 17f3f94ca6
3 changed files with 19 additions and 11 deletions

View File

@ -1867,7 +1867,7 @@ void CGameState::initMapObjects()
}
}
}
CGSubterraneanGate::postInit(gs); //pairing subterranean gates
CGSubterraneanGate::postInit(); //pairing subterranean gates
map->calculateGuardingGreaturePositions(); //calculate once again when all the guards are placed and initialized
}