- bugfix for network game settings broadcast and game end fog of war fix
This commit is contained in:
parent
272a072ec3
commit
8be87ee362
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue