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 5 commits into
base: main
Choose a base branch
from

Conversation

NachosChipeados
Copy link
Contributor

@NachosChipeados NachosChipeados commented Oct 2, 2024

Fixes #849, using the fix suggested by @Jan200101

How to test:

  1. Click "Launch Northstar"
  2. When the lobby starts loading and you can see you character, immediately press "right arrow + space", to join a private match.
    Without this pr, the game would kick you to the main menu. With this pr, no kick

Before:
https://github.com/user-attachments/assets/2447566b-68ae-4be5-8f22-35b45b7c094b

After:
https://github.com/user-attachments/assets/b59a50b7-ec12-4df5-82a5-78ed66769c70

@github-actions github-actions bot added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Oct 2, 2024
@GeckoEidechse
Copy link
Member

cc @Bobbyperson you might be able to verify this 👀

@Bobbyperson
Copy link
Contributor

yippie!!! i'll test when i get home

@Zanieon
Copy link
Contributor

Zanieon commented Oct 3, 2024

Sorry but this fix is not the way to solve #849 i addressed it to myself because the problem does not lie in the sh_loadouts script, it lies in how @ASpoonPlaysGames wrote the sh_progression script, this error comes from a threaded function that waits a solid second before registering the persistent loadouts, the validity check needs to be put in there.

@@ -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)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Moving the check to sh_progression doesn't seem to fix it on my end. I'm probably doing something wrong

Titanfall.2.2024-10-12.22-47-32.mp4

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nevermind, i was just being stupid. It works now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs code review Changes from PR still need to be reviewed in code needs testing Changes from the PR still need to be tested
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

UI Error after being kicked by NSDisconnectPlayer during loading screen
5 participants