From 8143a4e0cadb9ae91bdd3d554c192e6b9a3dacdc Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 19 May 2011 17:24:13 -0400 Subject: [PATCH] Take Thai's advice, update all steps on Tempo. --- src/AdjustSync.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/AdjustSync.cpp b/src/AdjustSync.cpp index b3a7fe4d5e..70e8610cae 100644 --- a/src/AdjustSync.cpp +++ b/src/AdjustSync.cpp @@ -279,6 +279,23 @@ void AdjustSync::AutosyncTempo() // change to the stops. FOREACH( StopSegment, GAMESTATE->m_pCurSong->m_SongTiming.m_StopSegments, i ) i->m_fStopSeconds *= 1.0f - fSlope; + + // Now the fun part: doing the same as above, but for each step. + const vector& vpSteps = GAMESTATE->m_pCurSong->GetAllSteps(); + FOREACH( Steps*, const_cast&>(vpSteps), s ) + { + TimingData &timing = (*s)->m_Timing; + timing.m_fBeat0OffsetInSeconds += fIntercept; + + FOREACH( BPMSegment, timing.m_BPMSegments, i ) + { + i->SetBPM( i->GetBPM() * fScaleBPM ); + } + FOREACH( StopSegment, timing.m_StopSegments, i ) + { + i->m_fStopSeconds *= 1.0f - fSlope; + } + } SCREENMAN->SystemMessage( AUTOSYNC_CORRECTION_APPLIED.GetValue() ); }