- 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;
|
needToBroadcastServerSettings = false;
|
||||||
showMasterserverError = false;
|
showMasterserverError = false;
|
||||||
masterServererErrorToShow = "---";
|
masterServererErrorToShow = "---";
|
||||||
lastSetChangedGameSettings = time(NULL);
|
lastSetChangedGameSettings = 0;
|
||||||
lastMasterserverPublishing = time(NULL);
|
lastMasterserverPublishing = 0;
|
||||||
soundConnectionCount=0;
|
soundConnectionCount=0;
|
||||||
|
|
||||||
mainMessageBox.init(lang.get("Ok"),lang.get("Return"));
|
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
|
// Send the game settings to each client if we have at least one networked client
|
||||||
if( serverInterface->getAllowGameDataSynchCheck() == true &&
|
if( serverInterface->getAllowGameDataSynchCheck() == true &&
|
||||||
haveAtLeastOneNetworkClientConnected == true &&
|
//haveAtLeastOneNetworkClientConnected == true &&
|
||||||
needToSetChangedGameSettings == true &&
|
needToSetChangedGameSettings == true &&
|
||||||
difftime(time(NULL),lastSetChangedGameSettings) >= 2)
|
difftime(time(NULL),lastSetChangedGameSettings) >= 2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// ==============================================================
|
// ==============================================================
|
||||||
// This file is part of Glest (www.glest.org)
|
// 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
|
// You can redistribute this code and/or modify it under
|
||||||
// the terms of the GNU General Public License as published
|
// the terms of the GNU General Public License as published
|
||||||
|
@ -59,6 +59,7 @@ public:
|
||||||
void incFowTextureAlphaSurface(const Vec2i &sPos, float alpha);
|
void incFowTextureAlphaSurface(const Vec2i &sPos, float alpha);
|
||||||
void resetFowTex();
|
void resetFowTex();
|
||||||
void updateFowTex(float t);
|
void updateFowTex(float t);
|
||||||
|
void setFogOfWar(bool value) { fogOfWar = value; resetFowTex(); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void computeTexture(const World *world);
|
void computeTexture(const World *world);
|
||||||
|
|
|
@ -85,7 +85,9 @@ void World::setFogOfWar(bool value) {
|
||||||
if(game != NULL && game->getGameSettings() != NULL) {
|
if(game != NULL && game->getGameSettings() != NULL) {
|
||||||
game->getGameSettings()->setFogOfWar(fogOfWar);
|
game->getGameSettings()->setFogOfWar(fogOfWar);
|
||||||
initCells(fogOfWar); //must be done after knowing faction number and dimensions
|
initCells(fogOfWar); //must be done after knowing faction number and dimensions
|
||||||
initMinimap();
|
//initMinimap();
|
||||||
|
minimap.setFogOfWar(fogOfWar);
|
||||||
|
computeFow();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user