From 300360a6125367af7d80d878de87e32b8fb8ee30 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 15 May 2011 17:45:21 -0400 Subject: [PATCH] [splittiming] Setup for math fun. Feels like we're doing trig or calculus here. --- src/ArrowEffects.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/ArrowEffects.cpp b/src/ArrowEffects.cpp index f8de8cfbdd..3224b0cb76 100644 --- a/src/ArrowEffects.cpp +++ b/src/ArrowEffects.cpp @@ -249,8 +249,15 @@ float ArrowEffects::GetYOffset( const PlayerState* pPlayerState, int iCol, float // TODO: If we allow noteskins to have metricable row spacing // (per issue 24), edit this to reflect that. -aj - fYOffset *= ARROW_SPACING * pCurSteps->m_Timing.GetSpeedPercentAtBeat( fSongBeat ); - + fYOffset *= ARROW_SPACING; + + // Factor in the SpeedSegment. + SpeedSegment &seg = pCurSteps->m_Timing.GetSpeedSegmentAtBeat( fSongBeat ); + if( seg.m_fPercent != 1 && fSongBeat + seg.m_fWait <= fNoteBeat ) + { + // Math here. + fYOffset *= pCurSteps->m_Timing.GetSpeedPercentAtBeat( fSongBeat ); + } // don't mess with the arrows after they've crossed 0 if( fYOffset < 0 ) return fYOffset * pPlayerState->m_PlayerOptions.GetCurrent().m_fScrollSpeed;