1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Fixed handling of match server crash

This commit is contained in:
Ivan Savenko
2024-02-04 19:56:04 +02:00
parent 7dee24edae
commit d4bedd8d8d
10 changed files with 69 additions and 81 deletions

View File

@ -490,7 +490,7 @@ std::string CMultiMode::getPlayerName()
{
std::string name = settings["general"]["playerName"].String();
if(name == "Player")
name = CGI->generaltexth->translate("vcmi.mainMenu.playerName");
name = CGI->generaltexth->translate("core.genrltxt.434");
return name;
}
@ -588,15 +588,8 @@ void CSimpleJoinScreen::connectToServer()
void CSimpleJoinScreen::leaveScreen()
{
if(CSH->state == EClientState::CONNECTING)
{
textTitle->setText(CGI->generaltexth->translate("vcmi.mainMenu.serverClosing"));
CSH->state = EClientState::CONNECTION_CANCELLED;
}
else if(GH.windows().isTopWindow(this))
{
close();
}
textTitle->setText(CGI->generaltexth->translate("vcmi.mainMenu.serverClosing"));
CSH->setState(EClientState::CONNECTION_CANCELLED);
}
void CSimpleJoinScreen::onChange(const std::string & newText)