aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-19 23:14:00 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-19 23:14:00 +0000
commitc02ec0cce39b36a6264e414a4741c8ea131f5286 (patch)
treeaa22c3dcb16bd7fbad618d158fa1cb3614b65ee3 /Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut
parentf8685213baf4eef93dae6cc98c8e4a8318565bd3 (diff)
downloadNorthstarMods-c02ec0cce39b36a6264e414a4741c8ea131f5286.tar.gz
NorthstarMods-c02ec0cce39b36a6264e414a4741c8ea131f5286.zip
temp fra fix
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut6
1 files changed, 6 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut
index e8deccb02..1feefc2b2 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut
@@ -11,6 +11,12 @@ bool function ClientCommandCallback_LeaveMatch( entity player, array<string> arg
// note: this is imperfect if we have multiple people of the same uid on a server, but that's only a thing in testing
if ( NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) )
{
+ if ( GetConVarBool( "ns_should_return_to_lobby" ) && GetMapName() != "mp_lobby" )
+ {
+ GameRules_EndMatch()
+ return true
+ }
+
foreach ( entity otherPlayer in GetPlayerArray() )
if ( otherPlayer != player )
thread WritePersistenceAndLeave( otherPlayer )