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 for friends times only showing in mapping mode #1080

Merged
merged 1 commit into from Oct 25, 2020
Merged

Conversation

braem
Copy link
Member

@braem braem commented Oct 25, 2020

Closes #1075

This is weird:
When not in mapping mode, an early return is hit because m_bUnauthorizedFriendlist is false on initialization. This caused the friends times API call to never be called. In mapping mode it is initialized to true.
There was no explicit initialization of this bool in the constructor so I added that and it fixed the issue.

Checklist

  • I have thoroughly tested all of the code I have modified/added/removed to ensure something else did not break
  • If there is a localization token change, I have updated the momentum_english_ref.res file with the changes, ran tokenizer.py to generate an up-to-date localization file, and have committed both the .res file changes and the new localization .txt file
  • If I introduced new h/cpp files, I have added them to the appropriate project's VPC file (server_momentum.vpc / client_momentum.vpc / etc)
  • If I have added or modified any visual assets (models, materials, panels, effects, etc), I have taken screenshots / videos of them and attached them to this PR directly (screenshots uploaded through github, videos uploaded to youtube and linked)
  • If I have modified any console command, console variable, or momentum entity, I have opened an issue (or a PR) for it in the Momentum Mod documentation repository
  • My commits are relatively small and scoped to the best of my ability
  • My branch has a clear history of changes that can be easy to follow when being reviewed commit-by-commit
  • My branch is functionally complete; the only changes to be done will be those potentially requested in code review

This is weird:
An early return is hit because `m_bUnauthorizedFriendlist` is `false` on initialization, so the API calls are never called.

The early return itself is erroronious. Fixed that and initialized to
`m_bUnauthorizedFriendlist` to `false`.
@braem
Copy link
Member Author

braem commented Oct 25, 2020

Actually i just went ahead and fixed what i believe is an erroneous early return then initialized to false.

Copy link
Member

@Gocnak Gocnak left a comment

Choose a reason for hiding this comment

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

Thank you windows for garbage data default construction, very cool.

@Gocnak Gocnak merged commit a310e22 into develop Oct 25, 2020
@Gocnak Gocnak deleted the fix/friends-times branch October 25, 2020 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Friends Tab not loading in Leaderboard
2 participants