1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Spectator mode

This commit is contained in:
nordsoft 2023-04-12 21:15:56 +04:00 committed by Nordsoft91
parent 662db90cc1
commit f005dbbc14

View File

@ -401,7 +401,12 @@ void CClient::initPlayerEnvironments()
playerEnvironments.clear();
auto allPlayers = CSH->getAllClientPlayers(CSH->c->connectionID);
if(allPlayers.empty())
{
Settings session = settings.write["session"];
session["spectate"].Bool() = true;
}
for(auto & color : allPlayers)
{
logNetwork->info("Preparing environment for player %s", color.getStr());