diff options
author | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 04:24:26 +0000 |
---|---|---|
committer | BobTheBob <32057864+BobTheBob9@users.noreply.github.com> | 2021-12-26 04:24:26 +0000 |
commit | dc60309beafb22e34d91593417b09d84e9442089 (patch) | |
tree | ebe5253297db76b0d9f6db3acef7f54bf6a18908 /Northstar.CustomServers/mod/scripts | |
parent | e4faa247edaf389d4d52e3a3129af540bb19a0ac (diff) | |
download | NorthstarMods-dc60309beafb22e34d91593417b09d84e9442089.tar.gz NorthstarMods-dc60309beafb22e34d91593417b09d84e9442089.zip |
evac, dropship, bleedout, flyout, private lobby, fastball and server browser fixes
Diffstat (limited to 'Northstar.CustomServers/mod/scripts')
3 files changed, 19 insertions, 16 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut index b5c6ea32..dd3d5e0e 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/lobby/_private_lobby.gnut @@ -39,10 +39,6 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<str { if ( file.startState == ePrivateMatchStartState.STARTING ) { - if ( GetConVarBool( "ns_private_match_only_host_can_start" ) ) - if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) - return true - // cancel start if we're already mid-countdown file.startState = ePrivateMatchStartState.READY SetUIVar( level, "privatematch_starting", ePrivateMatchStartState.READY ) @@ -50,6 +46,10 @@ bool function ClientCommandCallback_PrivateMatchLaunch( entity player, array<str } else { + if ( GetConVarBool( "ns_private_match_only_host_can_start" ) ) + if ( !NSIsPlayerIndexLocalPlayer( player.GetPlayerIndex() ) ) + return true + // start match file.startState = ePrivateMatchStartState.STARTING thread StartMatch() @@ -159,7 +159,7 @@ void function StartMatch() SetConVarString( "ns_private_match_last_map", file.map ) SetConVarString( "ns_private_match_last_mode", file.mode ) - SetConVarBool( "ns_should_return_to_lobby", true ) // potentially temp? + //SetConVarBool( "ns_should_return_to_lobby", true ) // potentially temp? string mode = file.mode if ( !( mode in GAMETYPE_TEXT ) ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut index fdcc468c..7ca1246b 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_dropship_intro.gnut @@ -146,7 +146,7 @@ void function SpawnPlayerIntoDropship( entity player ) int playerDropshipIndex = -1 foreach ( IntroDropship dropship in teamDropships ) for ( int i = 0; i < dropship.players.len(); i++ ) - if ( dropship.players[ i ] == player ) + if ( dropship.players[ i ] == null ) { playerDropship = dropship playerDropshipIndex = i diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut index 562f65e5..6518b633 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut @@ -717,18 +717,21 @@ void function SetWinner( int team, string winningReason = "", string losingReaso else file.announceRoundWinnerLosingSubstr = GetStringID( losingReason ) - if ( IsRoundBased() ) - { - if ( team != TEAM_UNASSIGNED ) - { - GameRules_SetTeamScore( team, GameRules_GetTeamScore( team ) + 1 ) - GameRules_SetTeamScore2( team, GameRules_GetTeamScore2( team ) + 1 ) + if ( GamePlayingOrSuddenDeath() ) + { + if ( IsRoundBased() ) + { + if ( team != TEAM_UNASSIGNED ) + { + GameRules_SetTeamScore( team, GameRules_GetTeamScore( team ) + 1 ) + GameRules_SetTeamScore2( team, GameRules_GetTeamScore2( team ) + 1 ) + } + + SetGameState( eGameState.WinnerDetermined ) } - - SetGameState( eGameState.WinnerDetermined ) + else + SetGameState( eGameState.WinnerDetermined ) } - else - SetGameState( eGameState.WinnerDetermined ) } void function AddTeamScore( int team, int amount ) |