diff options
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/_menu_callbacks.gnut | 6 |
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 ) |