- 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;
|
||||
//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)
|
||||
{
|
||||
|
|
|
@ -256,15 +256,15 @@ MenuStateCustomGame::MenuStateCustomGame(Program *program, MainMenu *mainMenu, b
|
|||
for(int i=0; i<GameConstants::maxPlayers; ++i){
|
||||
labelPlayers[i].init(100, setupPos-30-i*30);
|
||||
listBoxControls[i].init(200, setupPos-30-i*30);
|
||||
listBoxFactions[i].init(400, setupPos-30-i*30, 150);
|
||||
listBoxTeams[i].init(600, setupPos-30-i*30, 60);
|
||||
labelNetStatus[i].init(700, setupPos-30-i*30, 60);
|
||||
listBoxFactions[i].init(350, setupPos-30-i*30, 150);
|
||||
listBoxTeams[i].init(520, setupPos-30-i*30, 60);
|
||||
labelNetStatus[i].init(600, setupPos-30-i*30, 60);
|
||||
}
|
||||
|
||||
|
||||
labelControl.init(200, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelFaction.init(400, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelTeam.init(600, setupPos, 50, GraphicListBox::defH, true);
|
||||
labelFaction.init(350, setupPos, GraphicListBox::defW, GraphicListBox::defH, true);
|
||||
labelTeam.init(520, setupPos, 50, GraphicListBox::defH, true);
|
||||
|
||||
labelControl.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
labelFaction.setFont(CoreData::getInstance().getMenuFontBig());
|
||||
|
@ -936,13 +936,13 @@ void MenuStateCustomGame::update() {
|
|||
currentConnectionCount++;
|
||||
//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 &&
|
||||
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)
|
||||
|
|
|
@ -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()) {
|
||||
|
|
|
@ -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; }
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user