diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index 5eb8bbd3..bac05111 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -60,8 +60,8 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b needToBroadcastServerSettings = false; showMasterserverError = false; masterServererErrorToShow = "---"; - lastSetChangedGameSettings = time(NULL); - lastMasterserverPublishing = time(NULL); + lastSetChangedGameSettings = 0; + lastMasterserverPublishing = 0; soundConnectionCount=0; mainMessageBox.init(lang.get("Ok"),lang.get("Return")); @@ -695,7 +695,7 @@ void MenuStateCustomGame::update() // Send the game settings to each client if we have at least one networked client if( serverInterface->getAllowGameDataSynchCheck() == true && - haveAtLeastOneNetworkClientConnected == true && + //haveAtLeastOneNetworkClientConnected == true && needToSetChangedGameSettings == true && difftime(time(NULL),lastSetChangedGameSettings) >= 2) { diff --git a/source/glest_game/world/minimap.h b/source/glest_game/world/minimap.h index 8212c2ff..d3a1d6f9 100644 --- a/source/glest_game/world/minimap.h +++ b/source/glest_game/world/minimap.h @@ -1,7 +1,7 @@ // ============================================================== // This file is part of Glest (www.glest.org) // -// Copyright (C) 2001-2008 Martiņo Figueroa +// Copyright (C) 2001-2008 Martio Figueroa // // You can redistribute this code and/or modify it under // the terms of the GNU General Public License as published @@ -59,6 +59,7 @@ public: void incFowTextureAlphaSurface(const Vec2i &sPos, float alpha); void resetFowTex(); void updateFowTex(float t); + void setFogOfWar(bool value) { fogOfWar = value; resetFowTex(); } private: void computeTexture(const World *world); diff --git a/source/glest_game/world/world.cpp b/source/glest_game/world/world.cpp index fe288670..e9e74231 100644 --- a/source/glest_game/world/world.cpp +++ b/source/glest_game/world/world.cpp @@ -85,7 +85,9 @@ void World::setFogOfWar(bool value) { if(game != NULL && game->getGameSettings() != NULL) { game->getGameSettings()->setFogOfWar(fogOfWar); initCells(fogOfWar); //must be done after knowing faction number and dimensions - initMinimap(); + //initMinimap(); + minimap.setFogOfWar(fogOfWar); + computeFow(); } }