Fix DialogueBox's music causing huge song skip (lmao???) #14651
Merged
+2
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This also includes DialogueBoxPsych, since they share the same problem - not stopping music from playing after it fades out.
EDIT: forgot to actually explain what the problem is like.
So basically because both dialogue boxes use FlxG.sound.music as background track instance that makes that on one frame right after countdown ends game tries to sync Conductor.songPosition with current music time (aka dialogue music) and may skips pretty lengthy part of the chart and then sync back to the real music on the next frame. This appeared after the resync-vocals-rework branch got merged into experimental and may lead to either instantly dying or this part that was skipped being absent after game actually syncs song position with music time.