Skip to content

Commit

Permalink
Fix Timing Copier incorrectly resnapping slider ends in resnap mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
OliBomby committed Sep 12, 2024
1 parent d590c7a commit b2e8523
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Mapping_Tools/Views/TimingCopier/TimingCopierView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ private string Copy_Timing(TimingCopierVm arg, BackgroundWorker worker, DoWorkEv
foreach (HitObject ho in beatmapTo.HitObjects)
{
ho.ResnapSelf(timingTo, arg.BeatDivisors, firstTp: redlines.FirstOrDefault());
ho.ResnapEnd(timingTo, arg.BeatDivisors, firstTp: redlines.FirstOrDefault());
// It's not safe to resnap slider ends here because the sliders still assume the old duration and BPM
// And we haven't fixed the SV for new redlines yet
}

// Resnap greenlines
Expand All @@ -176,6 +177,16 @@ private string Copy_Timing(TimingCopierVm arg, BackgroundWorker worker, DoWorkEv
// Apply timing changes
TimingPointsChange.ApplyChanges(timingTo, timingPointsChanges);

if ((arg.ResnapMode == "Just resnap" || arg.ResnapMode == "Number of beats between objects stays the same") && redlines.Count > 0) {
// Resnap slider ends and spinner ends
beatmapTo.GiveObjectsGreenlines();
beatmapTo.CalculateSliderEndTimes();
foreach (HitObject ho in beatmapTo.HitObjects)
{
ho.ResnapEnd(timingTo, arg.BeatDivisors, firstTp: redlines.FirstOrDefault());
}
}

// Save the file
editorTo.SaveFile();

Expand Down

0 comments on commit b2e8523

Please sign in to comment.