diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-03-03 20:54:59 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2022-03-03 20:54:59 +0000 |
commit | 81809dfba9a8329f07d68d1fd66133161234effa (patch) | |
tree | 94c6571b4be52dbd03435ffee478a41e8c062922 /Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut | |
parent | fd0c66f5c84b7b6c349c3362c3e6df555c393aa5 (diff) | |
download | NorthstarMods-81809dfba9a8329f07d68d1fd66133161234effa.tar.gz NorthstarMods-81809dfba9a8329f07d68d1fd66133161234effa.zip |
spectator refactor and private match spectator support
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut index c56e537a..c410869e 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut @@ -123,7 +123,10 @@ bool function ClientCommandCallback_PrivateMatchSwitchTeams( entity player, arra bool function ClientCommandCallback_PrivateMatchToggleSpectate( entity player, array<string> args ) { - // not currently working, gotta figure it out at some point + if ( file.startState == ePrivateMatchStartState.STARTING || !GetConVarBool( "ns_allow_spectators" ) ) + return true + + player.SetPersistentVar( "privateMatchState", player.GetPersistentVarAsInt( "privateMatchState" ) == 0 ? 1 : 0 ) return true } |