diff options
author | Aibek <35672535+L1ghtman2k@users.noreply.github.com> | 2024-01-02 17:18:18 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-02 23:18:18 +0100 |
commit | 0e153649396355f8d726bad233992725633edea6 (patch) | |
tree | 74427f0046fc6e5a1676f737409c514a60dfa129 /Northstar.CustomServers/mod/scripts | |
parent | af84c42f714484e196cf0d82f9c296e3567b5f35 (diff) | |
download | NorthstarMods-1.21.3-rc1.tar.gz NorthstarMods-1.21.3-rc1.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')
-rw-r--r-- | Northstar.CustomServers/mod/scripts/vscripts/mp/_gamestate_mp.nut | 8 |
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 4c52a9bf..e2bb36d2 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() |