diff --git a/source/glest_game/game/game.cpp b/source/glest_game/game/game.cpp index 59dd8576..8f101fea 100644 --- a/source/glest_game/game/game.cpp +++ b/source/glest_game/game/game.cpp @@ -1382,9 +1382,14 @@ void Game::checkWinnerStandard(){ if(this->gameSettings.getEnableObserverModeAtEndGame() == true) { // Let the poor user watch everything unfold world.setFogOfWar(false); - //gameCamera.setClampBounds(false); - Renderer::getInstance().setPhotoMode(true); - gameCamera.setMaxHeight(500); + + // This caused too much LAG for network games + if(this->gameSettings.isNetworkGame() == false) { + Renderer::getInstance().setPhotoMode(true); + gameCamera.setMaxHeight(500); + } + // END + // but don't let him cheat via teamchat chatManager.setDisableTeamMode(true); } @@ -1413,9 +1418,13 @@ void Game::checkWinnerStandard(){ if(this->gameSettings.getEnableObserverModeAtEndGame() == true) { // Let the happy winner view everything left in the world world.setFogOfWar(false); - //gameCamera.setClampBounds(false); - Renderer::getInstance().setPhotoMode(true); - gameCamera.setMaxHeight(500); + + // This caused too much LAG for network games + if(this->gameSettings.isNetworkGame() == false) { + Renderer::getInstance().setPhotoMode(true); + gameCamera.setMaxHeight(500); + } + // END } showWinMessageBox(); diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index a8688b2d..7bf2de84 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -131,6 +131,22 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b mapFiles = results; std::for_each(results.begin(), results.end(), FormatString()); + labelLocalIP.init(410, networkHeadPos+30); + + string ipText = "none"; + std::vector ipList = Socket::getLocalIPAddressList(); + if(ipList.size() > 0) { + ipText = ""; + for(int idx = 0; idx < ipList.size(); idx++) { + string ip = ipList[idx]; + if(ipText != "") { + ipText += ", "; + } + ipText += ip; + } + } + labelLocalIP.setText(lang.get("LanIP") + ipText); + labelMap.init(100, mapHeadPos); listBoxMap.init(100, mapPos, 200); listBoxMap.setItems(results); @@ -687,6 +703,7 @@ void MenuStateCustomGame::render(){ renderer.renderLabel(&labelNetStatus[i]); } } + renderer.renderLabel(&labelLocalIP); renderer.renderLabel(&labelMap); renderer.renderLabel(&labelFogOfWar); renderer.renderLabel(&labelTileset); diff --git a/source/glest_game/menu/menu_state_custom_game.h b/source/glest_game/menu/menu_state_custom_game.h index 170b904f..61c4bf23 100644 --- a/source/glest_game/menu/menu_state_custom_game.h +++ b/source/glest_game/menu/menu_state_custom_game.h @@ -36,6 +36,7 @@ private: GraphicLabel labelMapInfo; GraphicLabel labelEnableObserverMode; GraphicLabel labelEnableServerControlledAI; + GraphicLabel labelLocalIP; GraphicListBox listBoxMap; diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index 02fca8bc..ea614f70 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -564,13 +564,13 @@ void ConnectionSlot::signalUpdate(ConnectionSlotEvent *event) { bool ConnectionSlot::updateCompleted() { assert(slotThreadWorker != NULL); - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex); + //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] playerIndex = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex); bool waitingForThread = (slotThreadWorker->isSignalCompleted() == false && slotThreadWorker->getQuitStatus() == false && slotThreadWorker->getRunningStatus() == true); - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] playerIndex = %d, waitingForThread = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex,waitingForThread); + //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] playerIndex = %d, waitingForThread = %d\n",__FILE__,__FUNCTION__,__LINE__,playerIndex,waitingForThread); return (waitingForThread == false); }