Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UI error when leaving the lobby too quickly #887

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Northstar.CustomServers/mod/scripts/vscripts/sh_loadouts.nut
Original file line number Diff line number Diff line change
Expand Up @@ -2812,6 +2812,9 @@ string function GetParentLoadoutProperty( string loadoutType, string propertyNam

int function GetPersistentSpawnLoadoutIndex( entity player, string loadoutType )
{
if (!IsValid ( player ) )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like @Zanieon said, this should probably be moved to sh_progression:172 to fix that specific issue, Though its arguably worth having a check here in general since something else could call it wrong (though I'd rather it fail if we are passing invalid entities here, there is no reason we should be)

return -1

int loadoutIndex = player.GetPersistentVarAsInt( loadoutType + "SpawnLoadout.index" )
if ( loadoutType == "titan" && loadoutIndex >= NUM_PERSISTENT_TITAN_LOADOUTS )
loadoutIndex = 0
Expand Down
Loading