From c15073a49a6f7814deef65f9d935289468914cb1 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Fri, 24 Dec 2021 20:05:14 +0000 Subject: fix grace period being allowed in titans --- Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut | 2 +- .../mod/scripts/vscripts/gamemodes/_gamemode_lts.nut | 1 + .../mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut | 1 + Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut | 3 +++ 4 files changed, 6 insertions(+), 1 deletion(-) (limited to 'Northstar.CustomServers') diff --git a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut index af028e71b..abd189e82 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut +++ b/Northstar.CustomServers/mod/scripts/vscripts/_loadouts_mp.gnut @@ -254,7 +254,7 @@ void function SetPlayerLoadoutDirty( entity player ) void function TryGivePilotLoadoutForGracePeriod( entity player ) { - if ( !IsLobby() && IsAlive( player ) && player.s.loadoutDirty ) + if ( !IsLobby() && IsAlive( player ) && player.s.loadoutDirty && !player.IsTitan() && !player.ContextAction_IsActive() ) { player.s.loadoutDirty = false diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut index 485981d8d..31c85a573 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_lts.nut @@ -22,6 +22,7 @@ void function GamemodeLts_Init() SetShouldUseRoundWinningKillReplay( true ) SetRoundWinningKillReplayKillClasses( true, true ) // both titan and pilot kills are tracked ScoreEvent_SetupEarnMeterValuesForTitanModes() + SetLoadoutGracePeriodEnabled( false ) FlagSet( "ForceStartSpawn" ) AddCallback_OnPilotBecomesTitan( RefreshThirtySecondWallhackHighlight ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut index c4ffada1b..a7dc00de1 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/gamemodes/_gamemode_ttdm.nut @@ -8,6 +8,7 @@ void function GamemodeTTDM_Init() Riff_ForceTitanExitEnabled( eTitanExitEnabled.Never ) TrackTitanDamageInPlayerGameStat( PGS_ASSAULT_SCORE ) ScoreEvent_SetupEarnMeterValuesForMixedModes() + SetLoadoutGracePeriodEnabled( false ) ClassicMP_SetCustomIntro( TTDMIntroSetup, TTDMIntroLength ) diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut index 4b90b1a29..562f65e50 100644 --- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut +++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut @@ -80,6 +80,9 @@ void function PIN_GameStart() void function SetGameState( int newState ) { + if ( newState == GetGameState() ) + return + SetServerVar( "gameStateChangeTime", Time() ) SetServerVar( "gameState", newState ) svGlobal.levelEnt.Signal( "GameStateChanged" ) -- cgit v1.2.3