Skip to content

Fix valid slide part list being corrupted when using mirror mod - #476

Merged
LumpBloom7 merged 2 commits into
masterfrom
fix-slide-mirror-corruption
Aug 16, 2023
Merged

LumpBloom7 merged 2 commits into
masterfrom
fix-slide-mirror-corruption

Conversation

@LumpBloom7

Copy link
Copy Markdown
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
@LumpBloom7
LumpBloom7 force-pushed the fix-slide-mirror-corruption branch from b05d5d9 to 0a17adf Compare August 12, 2023 23:38
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
@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