- bugfix for regression of disconnecting from server on lobby screen
This commit is contained in:
parent
abb515298d
commit
521fb237bf
|
@ -188,6 +188,7 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
{
|
||||
string sQuitText = Config::getInstance().getString("NetPlayerName",Socket::getHostName().c_str()) + " has chosen to leave the game!";
|
||||
clientInterface->sendTextMessage(sQuitText,-1);
|
||||
sleep(1);
|
||||
}
|
||||
clientInterface->close();
|
||||
}
|
||||
|
@ -197,9 +198,8 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
currentMap="";
|
||||
returnToJoinMenu();
|
||||
}
|
||||
|
||||
// Only allow changes after we get game settings from the server
|
||||
if( clientInterface->isConnected() == true &&
|
||||
else if( clientInterface->isConnected() == true &&
|
||||
clientInterface->getGameSettingsReceived() == true) {
|
||||
if(buttonPlayNow.mouseClick(x,y) && buttonPlayNow.getEnabled()) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
@ -257,18 +257,19 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
|||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
}
|
||||
|
||||
void MenuStateConnectedGame::returnToJoinMenu(){
|
||||
if(returnMenuInfo==jmSimple)
|
||||
{
|
||||
void MenuStateConnectedGame::returnToJoinMenu() {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
|
||||
if(returnMenuInfo == jmSimple) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
mainMenu->setState(new MenuStateJoinGame(program, mainMenu));
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
mainMenu->setState(new MenuStateMasterserver(program, mainMenu));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void MenuStateConnectedGame::mouseMove(int x, int y, const MouseState *ms){
|
||||
|
||||
buttonDisconnect.mouseMove(x, y);
|
||||
|
|
|
@ -96,6 +96,7 @@ bool NetworkInterface::isConnected(){
|
|||
}
|
||||
|
||||
void NetworkInterface::DisplayErrorMessage(string sErr, bool closeSocket) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] sErr [%s]\n",__FILE__,__FUNCTION__,__LINE__,sErr.c_str());
|
||||
|
||||
if(closeSocket == true && getSocket() != NULL)
|
||||
{
|
||||
|
@ -111,12 +112,11 @@ void NetworkInterface::DisplayErrorMessage(string sErr, bool closeSocket) {
|
|||
}
|
||||
|
||||
void NetworkInterface::clearChatInfo() {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] chatTextList.size() = %d\n",__FILE__,__FUNCTION__,__LINE__,chatTextList.size());
|
||||
|
||||
//chatText.clear();
|
||||
//chatSender.clear();
|
||||
//chatTeamIndex= -1;
|
||||
chatTextList.clear();
|
||||
if(chatTextList.size() > 0) {
|
||||
chatTextList.clear();
|
||||
}
|
||||
}
|
||||
|
||||
std::string NetworkInterface::getIpAddress() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user