- bugfix for allowing players to view map at game end for network games
This commit is contained in:
parent
6013a96efd
commit
5ecda82be0
|
@ -1659,7 +1659,7 @@ void Game::checkWinnerStandard(){
|
|||
if( this->gameSettings.isNetworkGame() == false ||
|
||||
this->gameSettings.getEnableObserverModeAtEndGame() == true) {
|
||||
// Let the happy winner view everything left in the world
|
||||
world.setFogOfWar(false);
|
||||
//world.setFogOfWar(false);
|
||||
|
||||
// This caused too much LAG for network games
|
||||
if(this->gameSettings.isNetworkGame() == false) {
|
||||
|
@ -1689,7 +1689,7 @@ void Game::checkWinnerStandard(){
|
|||
if( this->gameSettings.isNetworkGame() == false ||
|
||||
this->gameSettings.getEnableObserverModeAtEndGame() == true) {
|
||||
// Let the poor user watch everything unfold
|
||||
world.setFogOfWar(false);
|
||||
//world.setFogOfWar(false);
|
||||
|
||||
// This caused too much LAG for network games
|
||||
if(this->gameSettings.isNetworkGame() == false) {
|
||||
|
@ -1733,7 +1733,7 @@ void Game::checkWinnerStandard(){
|
|||
if( this->gameSettings.isNetworkGame() == false ||
|
||||
this->gameSettings.getEnableObserverModeAtEndGame() == true) {
|
||||
// Let the happy winner view everything left in the world
|
||||
world.setFogOfWar(false);
|
||||
//world.setFogOfWar(false);
|
||||
|
||||
// This caused too much LAG for network games
|
||||
if(this->gameSettings.isNetworkGame() == false) {
|
||||
|
|
|
@ -160,6 +160,8 @@ public:
|
|||
|
||||
static string findFactionLogoFile(const GameSettings *settings, Logger *logger, string factionLogoFilter="loading_screen.*");
|
||||
|
||||
bool getGameOver() { return gameOver; }
|
||||
|
||||
private:
|
||||
//render
|
||||
void render3d();
|
||||
|
|
|
@ -1113,7 +1113,10 @@ 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) {
|
||||
if(k == thisTeamIndex && thisTeamIndex == GameConstants::maxPlayers -1 + fpt_Observer) {
|
||||
if( k == thisTeamIndex &&
|
||||
(thisTeamIndex == GameConstants::maxPlayers -1 + fpt_Observer ||
|
||||
(game->getGameOver() == true && (game->getGameSettings()->isNetworkGame() == false ||
|
||||
game->getGameSettings()->getEnableObserverModeAtEndGame() == true)))) {
|
||||
map.getSurfaceCell(i, j)->setVisible(k, true);
|
||||
map.getSurfaceCell(i, j)->setExplored(k, true);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user