aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut3
1 files changed, 2 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut
index 0f37251d6..33c0b8e90 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_lobby.gnut
@@ -19,7 +19,8 @@ void function Lobby_Init()
void function Lobby_OnClientConnectionStarted( entity player )
{
-
+ if ( !( IsPrivateMatch() || GetCurrentPlaylistName() == "private_match" ) || !GetConVarBool( "ns_allow_spectators" ) )
+ player.SetPersistentVar( "privateMatchState", 0 ) // disable spectator
}
void function Lobby_OnClientConnectionCompleted( entity player )