aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-03 21:02:34 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-03 21:02:34 +0000
commita614d9c52ee1015a340609daa4196613ab37825d (patch)
tree311cec4f89bb40decc09a8ab3d997e6d179d30c8
parent81809dfba9a8329f07d68d1fd66133161234effa (diff)
downloadNorthstarMods-a614d9c52ee1015a340609daa4196613ab37825d.tar.gz
NorthstarMods-a614d9c52ee1015a340609daa4196613ab37825d.zip
private match spectator support for fastball
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball.gnut2
-rw-r--r--Northstar.Custom/mod/scripts/vscripts/gamemodes/_gamemode_fastball_intro.gnut9
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 )