From a614d9c52ee1015a340609daa4196613ab37825d Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Thu, 3 Mar 2022 21:02:34 +0000 Subject: private match spectator support for fastball --- .../mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut | 2 +- .../mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut index 9311d9d6..019bcc7d 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut @@ -282,7 +282,7 @@ function FastballOnPanelHacked( panel, player ) // respawn dead players foreach ( entity deadPlayer in GetPlayerArrayOfTeam( player.GetTeam() ) ) { - if ( !IsAlive( deadPlayer ) ) + if ( !IsAlive( deadPlayer ) && !IsPrivateMatchSpectator( player ) ) { deadPlayer.SetOrigin( panel.s.startOrigin ) deadPlayer.RespawnPlayer( null ) diff --git a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut index b4c18328..018af57d 100644 --- a/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut +++ b/Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut @@ -103,7 +103,7 @@ void function OnPrematchStart() thread AnimateBuddy( file.imcBuddy ) foreach ( entity player in GetPlayerArray() ) - thread FastballPlayer( player ) + AddPlayerToFastballIntro( player ) } void function AnimateBuddy( entity buddy ) @@ -135,7 +135,12 @@ void function AnimateBuddy( entity buddy ) void function AddPlayerToFastballIntro( entity player ) { if ( GetGameState() == eGameState.Prematch ) - thread FastballPlayer( player ) + { + if ( !IsPrivateMatchSpectator( player ) ) + thread FastballPlayer( player ) + else + RespawnPrivateMatchSpectator( player ) + } } void function FastballPlayer( entity player ) -- cgit v1.2.3