- added version string display for network lobbies
This commit is contained in:
parent
eb71e433e5
commit
7df6d2bc16
|
@ -68,7 +68,7 @@ MenuStateConnectedGame::MenuStateConnectedGame(Program *program, MainMenu *mainM
|
||||||
|
|
||||||
vector<string> teamItems, controlItems, results;
|
vector<string> teamItems, controlItems, results;
|
||||||
//state
|
//state
|
||||||
labelStatus.init(330, 700);
|
labelStatus.init(230, 700);
|
||||||
labelStatus.setText("");
|
labelStatus.setText("");
|
||||||
|
|
||||||
labelInfo.init(30, 700);
|
labelInfo.init(30, 700);
|
||||||
|
@ -476,6 +476,8 @@ void MenuStateConnectedGame::update()
|
||||||
label = label + " " + clientInterface->getServerName();
|
label = label + " " + clientInterface->getServerName();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
label = label + ", " + clientInterface->getVersionString();
|
||||||
|
|
||||||
if(clientInterface->getAllowGameDataSynchCheck() == true &&
|
if(clientInterface->getAllowGameDataSynchCheck() == true &&
|
||||||
clientInterface->getNetworkGameDataSynchCheckOk() == false)
|
clientInterface->getNetworkGameDataSynchCheckOk() == false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -256,15 +256,15 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b
|
||||||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||||
labelPlayers[i].init(100, setupPos-30-i*30);
|
labelPlayers[i].init(100, setupPos-30-i*30);
|
||||||
listBoxControls[i].init(200, setupPos-30-i*30);
|
listBoxControls[i].init(200, setupPos-30-i*30);
|
||||||
listBoxFactions[i].init(400, setupPos-30-i*30, 150);
|
listBoxFactions[i].init(350, setupPos-30-i*30, 150);
|
||||||
listBoxTeams[i].init(600, setupPos-30-i*30, 60);
|
listBoxTeams[i].init(520, setupPos-30-i*30, 60);
|
||||||
labelNetStatus[i].init(700, setupPos-30-i*30, 60);
|
labelNetStatus[i].init(600, setupPos-30-i*30, 60);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
labelControl.init(200, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
labelControl.init(200, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||||
labelFaction.init(400, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
labelFaction.init(350, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||||
labelTeam.init(600, setupPos, 50, GraphicListBox::defH, true);
|
labelTeam.init(520, setupPos, 50, GraphicListBox::defH, true);
|
||||||
|
|
||||||
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
labelFaction.setFont(CoreData::getInstance().getMenuFontBig());
|
labelFaction.setFont(CoreData::getInstance().getMenuFontBig());
|
||||||
|
@ -936,13 +936,13 @@ void MenuStateCustomGame::update() {
|
||||||
currentConnectionCount++;
|
currentConnectionCount++;
|
||||||
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] B - ctNetwork\n",__FILE__,__FUNCTION__);
|
//SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s] B - ctNetwork\n",__FILE__,__FUNCTION__);
|
||||||
|
|
||||||
string label = connectionSlot->getName();
|
string label = connectionSlot->getName() + ", " + connectionSlot->getVersionString();
|
||||||
if(connectionSlot->getAllowDownloadDataSynch() == true &&
|
if(connectionSlot->getAllowDownloadDataSynch() == true &&
|
||||||
connectionSlot->getAllowGameDataSynchCheck() == true)
|
connectionSlot->getAllowGameDataSynchCheck() == true)
|
||||||
{
|
{
|
||||||
if(connectionSlot->getNetworkGameDataSynchCheckOk() == false)
|
if(connectionSlot->getNetworkGameDataSynchCheckOk() == false)
|
||||||
{
|
{
|
||||||
label = connectionSlot->getName() + " - waiting to synch:";
|
label += " - waiting to synch:";
|
||||||
if(connectionSlot->getNetworkGameDataSynchCheckOkMap() == false)
|
if(connectionSlot->getNetworkGameDataSynchCheckOkMap() == false)
|
||||||
{
|
{
|
||||||
label = label + " map";
|
label = label + " map";
|
||||||
|
@ -958,12 +958,12 @@ void MenuStateCustomGame::update() {
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label = connectionSlot->getName() + " - data synch is ok";
|
label += " - data synch is ok";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
label = connectionSlot->getName();
|
//label = connectionSlot->getName();
|
||||||
|
|
||||||
if(connectionSlot->getAllowGameDataSynchCheck() == true &&
|
if(connectionSlot->getAllowGameDataSynchCheck() == true &&
|
||||||
connectionSlot->getNetworkGameDataSynchCheckOk() == false)
|
connectionSlot->getNetworkGameDataSynchCheckOk() == false)
|
||||||
|
|
|
@ -169,8 +169,9 @@ void ClientInterface::updateLobby()
|
||||||
|
|
||||||
if(receiveMessage(&networkMessageIntro)) {
|
if(receiveMessage(&networkMessageIntro)) {
|
||||||
gotIntro = true;
|
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
|
//check consistency
|
||||||
if(networkMessageIntro.getVersionString() != getNetworkVersionString()) {
|
if(networkMessageIntro.getVersionString() != getNetworkVersionString()) {
|
||||||
|
|
|
@ -52,6 +52,8 @@ private:
|
||||||
int currentFrameCount;
|
int currentFrameCount;
|
||||||
time_t lastNetworkCommandListSendTime;
|
time_t lastNetworkCommandListSendTime;
|
||||||
|
|
||||||
|
string versionString;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClientInterface();
|
ClientInterface();
|
||||||
virtual ~ClientInterface();
|
virtual ~ClientInterface();
|
||||||
|
@ -96,6 +98,8 @@ public:
|
||||||
|
|
||||||
virtual void sendPingMessage(int32 pingFrequency, int64 pingTime);
|
virtual void sendPingMessage(int32 pingFrequency, int64 pingTime);
|
||||||
|
|
||||||
|
const string &getVersionString() const {return versionString;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Mutex * getServerSynchAccessor() { return NULL; }
|
Mutex * getServerSynchAccessor() { return NULL; }
|
||||||
|
|
|
@ -318,8 +318,9 @@ void ConnectionSlot::update(bool checkForNewClients) {
|
||||||
{
|
{
|
||||||
gotIntro = true;
|
gotIntro = true;
|
||||||
name= networkMessageIntro.getName();
|
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)
|
if(getAllowGameDataSynchCheck() == true && serverInterface->getGameSettings() != NULL)
|
||||||
{
|
{
|
||||||
|
|
|
@ -109,6 +109,7 @@ private:
|
||||||
int currentLagCount;
|
int currentLagCount;
|
||||||
time_t lastReceiveCommandListTime;
|
time_t lastReceiveCommandListTime;
|
||||||
bool gotLagCountWarning;
|
bool gotLagCountWarning;
|
||||||
|
string versionString;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ConnectionSlot(ServerInterface* serverInterface, int playerIndex);
|
ConnectionSlot(ServerInterface* serverInterface, int playerIndex);
|
||||||
|
@ -154,6 +155,8 @@ public:
|
||||||
bool getLagCountWarning() const { return gotLagCountWarning; }
|
bool getLagCountWarning() const { return gotLagCountWarning; }
|
||||||
void setLagCountWarning(bool value) { gotLagCountWarning = value; }
|
void setLagCountWarning(bool value) { gotLagCountWarning = value; }
|
||||||
|
|
||||||
|
const string &getVersionString() const {return versionString;}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
Mutex * getServerSynchAccessor();
|
Mutex * getServerSynchAccessor();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user