diff --git a/stepmania/src/ArrowEffects.cpp b/stepmania/src/ArrowEffects.cpp index 8ad89d5468..617768034f 100644 --- a/stepmania/src/ArrowEffects.cpp +++ b/stepmania/src/ArrowEffects.cpp @@ -22,7 +22,6 @@ #include -RageTimer g_timerExpand; float g_fExpandSeconds = 0; float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat ) @@ -67,10 +66,12 @@ float ArrowGetYOffset( PlayerNumber pn, float fNoteBeat ) fYAdjust += fAccels[PlayerOptions::ACCEL_WAVE] * 20.0f*sinf( fYOffset/38.0f ); if( fAccels[PlayerOptions::ACCEL_EXPAND] > 0 ) { + /* Timers can't be global, since they'll be initialized before SDL. */ + static RageTimer timerExpand; if( !GAMESTATE->m_bFreeze ) - g_fExpandSeconds += g_timerExpand.GetDeltaTime(); + g_fExpandSeconds += timerExpand.GetDeltaTime(); else - g_timerExpand.GetDeltaTime(); // throw away + timerExpand.GetDeltaTime(); // throw away fYAdjust += fAccels[PlayerOptions::ACCEL_EXPAND] * (fYOffset * SCALE( cosf(g_fExpandSeconds*3), -1, 1, 0.5f, 1.5f ) - fYOffset); } if( fAccels[PlayerOptions::ACCEL_BOOMERANG] > 0 )