Skip to content

Commit 26b8064

Browse files
committed
Account for changing scroll speed.
1 parent 1e16e08 commit 26b8064

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/NoteField.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,21 +671,29 @@ float FindLastDisplayedBeat( const PlayerState* pPlayerState, int iDrawDistanceB
671671

672672
if (!bBoomerang)
673673
{
674+
// TODO: Account for M Mods...
674675
static float lastKnownBPS = 0;
675676
static float lastKnownRate = 0;
677+
static float lastKnownXSpeed = 0;
678+
static float lastKnownCSpeed = 0;
676679
static float pixelsPerBeat = 0;
677680

678681
float currentBPS = pPlayerState->GetDisplayedPosition().m_fCurBPS;
679682
float currentRate = GAMESTATE->m_SongOptions.GetCurrent().m_fMusicRate;
683+
float currentXSpace= pPlayerState->m_PlayerOptions.GetCurrent().m_fScrollSpeed;
684+
float currentCSpace = pPlayerState->m_PlayerOptions.GetCurrent().m_fScrollBPM;
680685

681686
// Song or BPM changed
682-
if (lastKnownBPS != currentBPS || lastKnownRate != currentRate)
687+
if (lastKnownBPS != currentBPS || lastKnownRate != currentRate
688+
|| lastKnownCSpeed != currentCSpace || lastKnownXSpeed != currentXSpace)
683689
{
684690
bool bIsPastPeakYOffset;
685691
float fPeakYOffset;
686692

687693
lastKnownBPS = currentBPS;
688694
lastKnownRate = currentRate;
695+
lastKnownXSpeed = currentXSpace;
696+
lastKnownCSpeed = currentCSpace;
689697

690698
float lastBeatElapsedTime = pPlayerState->GetDisplayedTiming().ElapsedTimesAtAllRows.at(pPlayerState->GetDisplayedTiming().ElapsedTimesAtAllRows.size() - 1);
691699

0 commit comments

Comments
 (0)