summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d9a5bbe)
raw | patch | inline | side by side (parent: d9a5bbe)
author | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Tue, 21 Feb 2023 18:17:25 +0000 (21:17 +0300) | ||
committer | DeaDDooMER <deaddoomer@deadsoftware.ru> | |
Fri, 9 Jun 2023 09:19:47 +0000 (12:19 +0300) |
src/game/g_game.pas | patch | blob | history |
diff --git a/src/game/g_game.pas b/src/game/g_game.pas
index fc06d8925d2ab0b6cdea80280d237b865b4682bc..3105360e1e8a675a3f9b59f30e2842522b283f38 100644 (file)
--- a/src/game/g_game.pas
+++ b/src/game/g_game.pas
(* spectator state check from render *)
- if (gPlayer1 = nil) and (gPlayer2 = nil) and (gSpectMode = SPECT_NONE) then
- gSpectMode := SPECT_STATS;
+ if (gPlayer1 = nil) and (gPlayer2 = nil) then
+ begin
+ (* no local players -> automatically enable to spectator mode *)
+ if gSpectMode = SPECT_NONE then gSpectMode := SPECT_STATS;
+ end
+ else
+ begin
+ (* at least one local player -> automatically disable spectator mode *)
+ gSpectMode := SPECT_NONE;
+ end;
if IsActivePlayer(g_Player_Get(gSpectPID1)) = false then
gSpectPID1 := GetActivePlayerID_Next();