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

* fixed bug when starting certain maps in campaigns

* introduced TPlayerColor typedef
This commit is contained in:
mateuszb
2012-09-24 16:14:53 +00:00
parent 95b866c131
commit 18bd898cb1
16 changed files with 122 additions and 124 deletions

View File

@ -399,11 +399,11 @@ void CGObjectInstance::getSightTiles(boost::unordered_set<int3, ShashInt3> &tile
}
void CGObjectInstance::hideTiles(int ourplayer, int radius) const
{
for (std::map<ui8, TeamState>::iterator i = cb->gameState()->teams.begin(); i != cb->gameState()->teams.end(); i++)
for (auto i = cb->gameState()->teams.begin(); i != cb->gameState()->teams.end(); i++)
{
if ( !vstd::contains(i->second.players, ourplayer ))//another team
{
for (std::set<ui8>::iterator j = i->second.players.begin(); j != i->second.players.end(); j++)
for (auto j = i->second.players.begin(); j != i->second.players.end(); j++)
if ( cb->getPlayer(*j)->status == PlayerState::INGAME )//seek for living player (if any)
{
FoWChange fw;