aboutsummaryrefslogtreecommitdiff
path: root/Northstar.CustomServers/mod
diff options
context:
space:
mode:
authorNachosChipeados <103285866+NachosChipeados@users.noreply.github.com>2024-11-18 09:19:20 -0400
committerGitHub <noreply@github.com>2024-11-18 14:19:20 +0100
commit316ec34133f264dc7d5bfc7a0a3eb0f622f83bed (patch)
treeb34d6f5f5425ed698acce2f98cd932dd2e1fdeeb /Northstar.CustomServers/mod
parent22a9dc50fc20d384930b177ab8c47fdf7bb9870c (diff)
downloadNorthstarMods-316ec34133f264dc7d5bfc7a0a3eb0f622f83bed.tar.gz
NorthstarMods-316ec34133f264dc7d5bfc7a0a3eb0f622f83bed.zip
Fix UI error when leaving the lobby too quickly (#887)
Adds a validity check for UIPlayer identity before fetching persistent spawn loadout index
Diffstat (limited to 'Northstar.CustomServers/mod')
-rw-r--r--Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut9
1 files changed, 7 insertions, 2 deletions
diff --git a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
index 3297643e..307548d7 100644
--- a/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
+++ b/Northstar.CustomServers/mod/scripts/vscripts/sh_progression.nut
@@ -169,8 +169,13 @@ void function UpdateCachedLoadouts_Threaded()
// below here is just making all the menu models update properly and such
#if UI
- uiGlobal.pilotSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( GetUIPlayer(), "pilot" )
- uiGlobal.titanSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( GetUIPlayer(), "titan" )
+ entity UIPlayer = GetUIPlayer()
+
+ if ( !IsValid( UIPlayer ) )
+ return
+
+ uiGlobal.pilotSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( UIPlayer, "pilot" )
+ uiGlobal.titanSpawnLoadoutIndex = GetPersistentSpawnLoadoutIndex( UIPlayer, "titan" )
#endif
#if CLIENT