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 valid slide part list being corrupted when using mirror mod #476

Merged
merged 2 commits into from
Aug 16, 2023

Conversation

LumpBloom7
Copy link
Owner

SlidePaths precomputes a bunch of valid paths parts to be used in beatmap conversions. The converted maps will use the parts when creating slides.

The mirrored mod would then adjust the EndOffset and Mirrored properties so that it actually gets mirrored.

The problem is that SlideBodyPart is a class, which meant that adjustments to a part's properties that will affect the original copy within the valid path listing, causing problems in future map conversions.

Now SlideBodyPart is a struct, which is copy-on-use, avoiding the problem.

@LumpBloom7 LumpBloom7 added the bug Something isn't working label Aug 12, 2023
Structs are still copy on write, so modifying without ref vars only affected the local copy in the loop.
@LumpBloom7 LumpBloom7 merged commit f7c6012 into master Aug 16, 2023
3 checks passed
@LumpBloom7 LumpBloom7 deleted the fix-slide-mirror-corruption branch August 16, 2023 17:33
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.

1 participant