- bugfix for game over and player can see whole map causing out of synch in some cases.

This commit is contained in:
Mark Vejvoda 2011-01-26 16:13:08 +00:00
parent 99a6826e51
commit ff3bb353fc
1 changed files with 4 additions and 6 deletions

View File

@ -1231,10 +1231,8 @@ void World::computeFow(int factionIdxToTick) {
for(int j = 0; j < map.getSurfaceH(); ++j) {
for(int k = 0; k < GameConstants::maxPlayers + GameConstants::specialFactions; ++k) {
if(fogOfWar || k != thisTeamIndex) {
map.getSurfaceCell(i, j)->setVisible(k, false);
if(showWorldForPlayer(k) == true) {
//map.getSurfaceCell(i, j)->setVisible(k, true);
//map.getSurfaceCell(i, j)->setExplored(k, true);
const Vec2i pos(i,j);
Vec2i surfPos= pos;
@ -1255,9 +1253,9 @@ void World::computeFow(int factionIdxToTick) {
float alpha=maxAlpha;
minimap.incFowTextureAlphaSurface(surfPos, alpha);
}
else {
map.getSurfaceCell(i, j)->setVisible(k, false);
}
//else {
// map.getSurfaceCell(i, j)->setVisible(k, false);
//}
}
}
}