mirror of
https://github.com/glest/glest-source.git
synced 2025-09-20 20:51:28 +02:00
- bugfix for fog of war enabling at game end.. now works properly for Winning teams, not just losing teams.
This commit is contained in:
@@ -1195,6 +1195,10 @@ bool World::showWorldForPlayer(int factionIndex) const {
|
||||
game->getGameSettings()->isNetworkGame() == true &&
|
||||
game->getGameSettings()->getEnableObserverModeAtEndGame() == true) {
|
||||
ret = true;
|
||||
|
||||
// If the faction is NOT on the winning team, don't let them see the map
|
||||
// until all mobile units are dead
|
||||
if(getStats()->getVictory(factionIndex) == false) {
|
||||
// If the player has at least 1 Unit alive that is mobile (can move)
|
||||
// then we cannot turn off fog of war
|
||||
for(int i = 0; i < getFaction(factionIndex)->getUnitCount(); ++i) {
|
||||
@@ -1206,6 +1210,7 @@ bool World::showWorldForPlayer(int factionIndex) const {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Reference in New Issue
Block a user