From 15a37d022a4fb32f0d69ecd6eaa4894209b73c69 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Fri, 24 Dec 2021 23:44:59 +0000 Subject: add more private lobby host settings --- .../mod/scripts/vscripts/lobby/_private_lobby.gnut | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'Northstar.CustomServers/mod/scripts/vscripts') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut index 3acd16529..b5c6ea32f 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut @@ -39,6 +39,10 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array a if ( args.len() != 1 ) return true + if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) == 2 ) + if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) + return true + // todo: need to verify this value file.map = args[0] @@ -190,6 +202,10 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p { if ( args.len() < 2 ) return true + + if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 ) + if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) + return true bool found = false foreach ( string category in GetPrivateMatchSettingCategories() ) @@ -212,6 +228,10 @@ bool function ClientCommandCallback_PrivateMatchSetPlaylistVarOverride( entity p bool function ClientCommandCallback_ResetMatchSettingsToDefault( entity player, array args ) { + if ( GetConVarInt( "ns_private_match_only_host_can_change_settings" ) >= 1 ) + if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) + return true + ClearPlaylistVarOverrides() return true } \ No newline at end of file -- cgit v1.2.3