1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

CClient no longer inherits from CGameInfoCallback

This commit is contained in:
Ivan Savenko
2025-05-20 23:16:28 +03:00
parent fa6bf02b6e
commit ff0f5290f7
8 changed files with 95 additions and 87 deletions

View File

@@ -90,7 +90,7 @@ void ClientCommandManager::handleGoSoloCommand()
// unlikely it will work but just in case to be consistent
for(auto & color : GAME->server().getAllClientPlayers(GAME->server().logicConnection->connectionID))
{
if(color.isValidPlayer() && GAME->server().client->getStartInfo()->playerInfos.at(color).isControlledByHuman())
if(color.isValidPlayer() && GAME->server().client->gameInfo().getStartInfo()->playerInfos.at(color).isControlledByHuman())
{
GAME->server().client->installNewPlayerInterface(std::make_shared<CPlayerInterface>(color), color);
}
@@ -103,9 +103,9 @@ void ClientCommandManager::handleGoSoloCommand()
for(auto & color : GAME->server().getAllClientPlayers(GAME->server().logicConnection->connectionID))
{
if(color.isValidPlayer() && GAME->server().client->getStartInfo()->playerInfos.at(color).isControlledByHuman())
if(color.isValidPlayer() && GAME->server().client->gameInfo().getStartInfo()->playerInfos.at(color).isControlledByHuman())
{
auto AiToGive = GAME->server().client->aiNameForPlayer(*GAME->server().client->getPlayerSettings(color), false, false);
auto AiToGive = GAME->server().client->aiNameForPlayer(*GAME->server().client->gameInfo().getPlayerSettings(color), false, false);
printCommandMessage("Player " + color.toString() + " will be lead by " + AiToGive, ELogLevel::INFO);
GAME->server().client->installNewPlayerInterface(CDynLibHandler::getNewAI(AiToGive), color);
}