aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod/scripts/vscripts
diff options
context:
space:
mode:
authorAibek <35672535+L1ghtman2k@users.noreply.github.com>2024-01-02 17:18:18 -0500
committerGitHub <noreply@github.com>2024-01-02 23:18:18 +0100
commit0e153649396355f8d726bad233992725633edea6 (patch)
tree74427f0046fc6e5a1676f737409c514a60dfa129 /Northstar.CustomServers/mod/scripts/vscripts
parentaf84c42f714484e196cf0d82f9c296e3567b5f35 (diff)
downloadNorthstarMods-0e153649396355f8d726bad233992725633edea6.tar.gz
NorthstarMods-0e153649396355f8d726bad233992725633edea6.zip
Fix spectating for LTS (#774)v1.21.3-rc1v1.21.3
Adds missing spectator initialisation Co-authored-by: Khalmee <87766895+Khalmee@users.noreply.github.com>
Diffstat (limited to 'Northstar.CustomServers/mod/scripts/vscripts')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut8
1 files changed, 8 insertions, 0 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
index 4c52a9bfd..e2bb36d2b 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut
@@ -201,6 +201,14 @@ void function GameStateEnter_Prematch()
if ( !GetClassicMPMode() && !ClassicMP_ShouldTryIntroAndEpilogueWithoutClassicMP() )
thread StartGameWithoutClassicMP()
+
+ // Initialise any spectators. Hopefully they are all initialised already in CodeCallback_OnClientConnectionCompleted
+ // (_base_gametype_mp.gnut) but for modes like LTS this doesn't seem to happen late enough to work properly.
+ foreach ( player in GetPlayerArray() )
+ {
+ if ( IsPrivateMatchSpectator( player ) )
+ InitialisePrivateMatchSpectatorPlayer( player )
+ }
}
void function StartGameWithoutClassicMP()