aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-03 20:54:59 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-03-03 20:54:59 +0000
commit81809dfba9a8329f07d68d1fd66133161234effa (patch)
tree94c6571b4be52dbd03435ffee478a41e8c062922 /Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut
parentfd0c66f5c84b7b6c349c3362c3e6df555c393aa5 (diff)
downloadNorthstarMods-81809dfba9a8329f07d68d1fd66133161234effa.tar.gz
NorthstarMods-81809dfba9a8329f07d68d1fd66133161234effa.zip
spectator refactor and private match spectator support
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut14
1 files changed, 12 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut
index 106f867b1..7901e3a23 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_classic_mp_no_intro.gnut
@@ -38,8 +38,12 @@ void function ClassicMP_DefaultNoIntro_Start()
foreach ( entity player in GetPlayerArray() )
{
- player.UnfreezeControlsOnServer()
- RemoveCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING )
+ if ( !IsPrivateMatchSpectator( player ) )
+ {
+ player.UnfreezeControlsOnServer()
+ RemoveCinematicFlag( player, CE_FLAG_CLASSIC_MP_SPAWNING )
+ }
+
TryGameModeAnnouncement( player )
}
}
@@ -52,6 +56,12 @@ void function ClassicMP_DefaultNoIntro_SpawnPlayer( entity player )
if ( GetGameState() != eGameState.Prematch )
return
+ if ( IsPrivateMatchSpectator( player ) ) // private match spectators use custom spawn logic
+ {
+ RespawnPrivateMatchSpectator( player )
+ return
+ }
+
if ( IsAlive( player ) )
player.Die()