mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-21 00:19:29 +02:00
Removed CGI in favor of VLC. Map handle is for now global variable
This commit is contained in:
@ -11,7 +11,6 @@
|
||||
|
||||
#include "CServerHandler.h"
|
||||
#include "Client.h"
|
||||
#include "CGameInfo.h"
|
||||
#include "ServerRunner.h"
|
||||
#include "GameChatHandler.h"
|
||||
#include "CPlayerInterface.h"
|
||||
@ -27,7 +26,6 @@
|
||||
#include "media/CMusicHandler.h"
|
||||
#include "media/IVideoPlayer.h"
|
||||
|
||||
|
||||
#include "mainmenu/CMainMenu.h"
|
||||
#include "mainmenu/CPrologEpilogVideo.h"
|
||||
#include "mainmenu/CHighScoreScreen.h"
|
||||
@ -60,6 +58,8 @@
|
||||
|
||||
#include <vcmi/events/EventBus.h>
|
||||
|
||||
CServerHandler * CSH = nullptr;
|
||||
|
||||
CServerHandler::~CServerHandler()
|
||||
{
|
||||
if (serverRunner)
|
||||
@ -144,7 +144,7 @@ void CServerHandler::resetStateForLobby(EStartMode mode, ESelectionScreen screen
|
||||
{
|
||||
std::string playerName = settings["general"]["playerName"].String();
|
||||
if(playerName == "Player")
|
||||
playerName = CGI->generaltexth->translate("core.genrltxt.434");
|
||||
playerName = VLC->generaltexth->translate("core.genrltxt.434");
|
||||
localPlayerNames.push_back(playerName);
|
||||
}
|
||||
|
||||
@ -230,7 +230,7 @@ void CServerHandler::onConnectionFailed(const std::string & errorMessage)
|
||||
{
|
||||
// remote server refused connection - show error message
|
||||
setState(EClientState::NONE);
|
||||
CInfoWindow::showInfoDialog(CGI->generaltexth->translate("vcmi.mainMenu.serverConnectionFailed"), {});
|
||||
CInfoWindow::showInfoDialog(VLC->generaltexth->translate("vcmi.mainMenu.serverConnectionFailed"), {});
|
||||
}
|
||||
}
|
||||
|
||||
@ -894,7 +894,7 @@ void CServerHandler::onDisconnected(const std::shared_ptr<INetworkConnection> &
|
||||
{
|
||||
endGameplay();
|
||||
CMM->menu->switchToTab("main");
|
||||
showServerError(CGI->generaltexth->translate("vcmi.server.errors.disconnected"));
|
||||
showServerError(VLC->generaltexth->translate("vcmi.server.errors.disconnected"));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -923,7 +923,7 @@ void CServerHandler::waitForServerShutdown()
|
||||
{
|
||||
if (getState() == EClientState::CONNECTING)
|
||||
{
|
||||
showServerError(CGI->generaltexth->translate("vcmi.server.errors.existingProcess"));
|
||||
showServerError(VLC->generaltexth->translate("vcmi.server.errors.existingProcess"));
|
||||
setState(EClientState::CONNECTION_CANCELLED); // stop attempts to reconnect
|
||||
}
|
||||
logNetwork->error("Error: server failed to close correctly or crashed!");
|
||||
|
Reference in New Issue
Block a user