From f005dbbc147731ec0416e70596da69b6dd62ded6 Mon Sep 17 00:00:00 2001 From: nordsoft Date: Wed, 12 Apr 2023 21:15:56 +0400 Subject: [PATCH] Spectator mode --- client/Client.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/client/Client.cpp b/client/Client.cpp index 2ca4781af..1754b792a 100644 --- a/client/Client.cpp +++ b/client/Client.cpp @@ -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());