aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/scripts/vscripts/lobby
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.CustomServers/scripts/vscripts/lobby')
-rw-r--r--Northstar.CustomServers/scripts/vscripts/lobby/_private_lobby.gnut7
-rw-r--r--Northstar.CustomServers/scripts/vscripts/lobby/sh_lobby.gnut4
2 files changed, 9 insertions, 2 deletions
diff --git a/Northstar.CustomServers/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/scripts/vscripts/lobby/_private_lobby.gnut
index 8d803da1..1b4e5dbd 100644
--- a/Northstar.CustomServers/scripts/vscripts/lobby/_private_lobby.gnut
+++ b/Northstar.CustomServers/scripts/vscripts/lobby/_private_lobby.gnut
@@ -17,6 +17,7 @@ void function PrivateLobby_Init()
AddClientCommandCallback( "PrivateMatchSetMode", ClientCommandCallback_PrivateMatchSetMode )
AddClientCommandCallback( "SetCustomMap", ClientCommandCallback_SetCustomMap )
AddClientCommandCallback( "PrivateMatchSwitchTeams", ClientCommandCallback_PrivateMatchSwitchTeams )
+ AddClientCommandCallback( "ResetMatchSettingsToDefault", ClientCommandCallback_ResetMatchSettingsToDefault )
}
bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<string> args )
@@ -157,4 +158,10 @@ void function RefreshPlayerTeams()
lastSetMilitia = !lastSetMilitia
}
}
+}
+
+bool function ClientCommandCallback_ResetMatchSettingsToDefault( entity player, array<string> args )
+{
+ ClearPlaylistVarOverrides()
+ return true
} \ No newline at end of file
diff --git a/Northstar.CustomServers/scripts/vscripts/lobby/sh_lobby.gnut b/Northstar.CustomServers/scripts/vscripts/lobby/sh_lobby.gnut
index 24436017..fda0e5ff 100644
--- a/Northstar.CustomServers/scripts/vscripts/lobby/sh_lobby.gnut
+++ b/Northstar.CustomServers/scripts/vscripts/lobby/sh_lobby.gnut
@@ -161,7 +161,7 @@ string function GetPrivateMatchMapForIndex( int index )
{
array<string> mapsArray = GetPrivateMatchMaps()
- if ( index >= mapsArray.len() )
+ if ( index >= mapsArray.len() || index < 0 )
return ""
return mapsArray[index]
@@ -171,7 +171,7 @@ string function GetPrivateMatchModeForIndex( int index )
{
array<string> modesArray = GetPrivateMatchModes()
- if ( index >= modesArray.len() )
+ if ( index >= modesArray.len() || index < 0 )
return ""
return modesArray[index]