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 missing score data in solo play after playing a map in multiplayer, Fix errors when starting the tutorial #74

Closed
wants to merge 2 commits into from

Conversation

Shadnix-was-taken
Copy link
Contributor

When playing a map in multiplayer mode, a couple of game objects (for example the ScoreController) linger around until the next game restart. When going back to solo play after playing a map in multiplayer, HTTP Status currently grabs the multiplayer objects and as a result is not getting certain data for the solo map.

Steps to reproduce with the layout by Reselim:

  • Play a map in multiplayer, overlay is as expected
  • Switch to solo play and start a map. The score on the overlay stays at 0.

This PR should fix at least part of it. There might be more cases of getting the wrong object, as I only tested with the data that was available on the old Reselim overlay.

This PR also adds an additional check if the level data is present in BS_Utils on HandleSongStart. HTTP Status currently throws multiple different errors when starting the tutorial (also different depending if the player played a map in multplayer before starting the tutorial) and this fixes it by doing nothing when entering the tutorial.

@opl-
Copy link
Owner

opl- commented Sep 18, 2021

Is there any reason you're grabbing the first object when in multiplayer and last in other cases, instead of simply always grabbing the last object?

@opl- opl- added the bug Something isn't working label Sep 18, 2021
@Shadnix-was-taken
Copy link
Contributor Author

Yeah - tried that first and it didn't work. I think there is a a score controller floating around for every player in MP? Don't quote me on that one.

I can try to look into that a bit more today. Also, if you think there is a better way to implement handling solo play after a multi session, feel free to disregard this PR and take it as a bug report.

opl- added a commit that referenced this pull request Sep 24, 2021
Co-authored-by: Shadnix <shadnix@arcor.de>
opl- added a commit that referenced this pull request Sep 24, 2021
Co-authored-by: Shadnix <shadnix@arcor.de>
@opl-
Copy link
Owner

opl- commented Sep 24, 2021

I effectively used your approach, but slightly rewritten and including some types you missed. Added you as a co-author to those commits. Thanks!

@opl- opl- closed this Sep 24, 2021
opl- added a commit that referenced this pull request Sep 24, 2021
Adds:
- `beatmap.color` representing the colors used by the environment. See [protocol.md] for more information.

Fixes:
- Playing multiplayer causes future maps played in singleplayer to not fire events correctly. (#74)
- Tutorial should no longer cause exceptions to be logged. (#74)
- levelFailed callback not unregistered correctly from the gameplay manager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants