diff --git a/source/glest_game/menu/menu_state_connected_game.cpp b/source/glest_game/menu/menu_state_connected_game.cpp index c1ce7050..a2a3742c 100644 --- a/source/glest_game/menu/menu_state_connected_game.cpp +++ b/source/glest_game/menu/menu_state_connected_game.cpp @@ -68,7 +68,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM vector teamItems, controlItems, results; //state - labelStatus.init(330, 700); + labelStatus.init(230, 700); labelStatus.setText(""); labelInfo.init(30, 700); @@ -476,6 +476,8 @@ void MenuStateConnectedGame::update() label = label + " " + clientInterface->getServerName(); } + label = label + ", " + clientInterface->getVersionString(); + if(clientInterface->getAllowGameDataSynchCheck() == true && clientInterface->getNetworkGameDataSynchCheckOk() == false) { diff --git a/source/glest_game/menu/menu_state_custom_game.cpp b/source/glest_game/menu/menu_state_custom_game.cpp index b5ca3600..9e8fcd1e 100644 --- a/source/glest_game/menu/menu_state_custom_game.cpp +++ b/source/glest_game/menu/menu_state_custom_game.cpp @@ -256,15 +256,15 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b for(int i=0; igetName(); + string label = connectionSlot->getName() + ", " + connectionSlot->getVersionString(); if(connectionSlot->getAllowDownloadDataSynch() == true && connectionSlot->getAllowGameDataSynchCheck() == true) { if(connectionSlot->getNetworkGameDataSynchCheckOk() == false) { - label = connectionSlot->getName() + " - waiting to synch:"; + label += " - waiting to synch:"; if(connectionSlot->getNetworkGameDataSynchCheckOkMap() == false) { label = label + " map"; @@ -958,12 +958,12 @@ void MenuStateCustomGame::update() { } else { - label = connectionSlot->getName() + " - data synch is ok"; + label += " - data synch is ok"; } } else { - label = connectionSlot->getName(); + //label = connectionSlot->getName(); if(connectionSlot->getAllowGameDataSynchCheck() == true && connectionSlot->getNetworkGameDataSynchCheckOk() == false) diff --git a/source/glest_game/network/client_interface.cpp b/source/glest_game/network/client_interface.cpp index ce522e9b..93e22550 100755 --- a/source/glest_game/network/client_interface.cpp +++ b/source/glest_game/network/client_interface.cpp @@ -169,8 +169,9 @@ void ClientInterface::updateLobby() if(receiveMessage(&networkMessageIntro)) { gotIntro = true; + versionString = networkMessageIntro.getVersionString(); - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] got NetworkMessageIntro, networkMessageIntro.getGameState() = %d\n",__FILE__,__FUNCTION__,__LINE__,networkMessageIntro.getGameState()); + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] got NetworkMessageIntro, networkMessageIntro.getGameState() = %d, versionString [%s]\n",__FILE__,__FUNCTION__,__LINE__,networkMessageIntro.getGameState(),versionString.c_str()); //check consistency if(networkMessageIntro.getVersionString() != getNetworkVersionString()) { diff --git a/source/glest_game/network/client_interface.h b/source/glest_game/network/client_interface.h index 144313cc..d5f81126 100644 --- a/source/glest_game/network/client_interface.h +++ b/source/glest_game/network/client_interface.h @@ -52,6 +52,8 @@ private: int currentFrameCount; time_t lastNetworkCommandListSendTime; + string versionString; + public: ClientInterface(); virtual ~ClientInterface(); @@ -96,6 +98,8 @@ public: virtual void sendPingMessage(int32 pingFrequency, int64 pingTime); + const string &getVersionString() const {return versionString;} + protected: Mutex * getServerSynchAccessor() { return NULL; } diff --git a/source/glest_game/network/connection_slot.cpp b/source/glest_game/network/connection_slot.cpp index ea614f70..eea325d7 100644 --- a/source/glest_game/network/connection_slot.cpp +++ b/source/glest_game/network/connection_slot.cpp @@ -318,8 +318,9 @@ void ConnectionSlot::update(bool checkForNewClients) { { gotIntro = true; name= networkMessageIntro.getName(); + versionString = networkMessageIntro.getVersionString(); - SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] got name [%s]\n",__FILE__,__FUNCTION__,name.c_str()); + SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] got name [%s] versionString [%s]\n",__FILE__,__FUNCTION__,name.c_str(),versionString.c_str()); if(getAllowGameDataSynchCheck() == true && serverInterface->getGameSettings() != NULL) { diff --git a/source/glest_game/network/connection_slot.h b/source/glest_game/network/connection_slot.h index 48a38513..2c00e6ee 100644 --- a/source/glest_game/network/connection_slot.h +++ b/source/glest_game/network/connection_slot.h @@ -109,6 +109,7 @@ private: int currentLagCount; time_t lastReceiveCommandListTime; bool gotLagCountWarning; + string versionString; public: ConnectionSlot(ServerInterface* serverInterface, int playerIndex); @@ -154,6 +155,8 @@ public: bool getLagCountWarning() const { return gotLagCountWarning; } void setLagCountWarning(bool value) { gotLagCountWarning = value; } + const string &getVersionString() const {return versionString;} + protected: Mutex * getServerSynchAccessor();