Fix Expand, possibly other mods, for 2nd player.

This commit is contained in:
Jason Felds
2011-11-01 15:20:20 -04:00
parent 8821b41127
commit 1c28a06bb6
2 changed files with 12 additions and 8 deletions
+5
View File
@@ -8,6 +8,11 @@ ________________________________________________________________________________
StepMania 5.0 $next | 2011xxxx
--------------------------------------------------------------------------------
2011/11/01
----------
* [ArrowEffects] Fix Expand, and possibly other mods, from breaking if
using a second player. [Wolfman2000]
2011/10/29
----------
* [GameState] Add the ResetPlayerOptions lua binding. [Wolfman2000]
+7 -8
View File
@@ -84,6 +84,9 @@ void ArrowEffects::Update()
{
const Style* pStyle = GAMESTATE->GetCurrentStyle();
static float fLastTime = 0;
float fTime = RageTimer::GetTimeSinceStartFast();
FOREACH_PlayerNumber( pn )
{
const Style::ColumnInfo* pCols = pStyle->m_ColumnInfo[pn];
@@ -92,15 +95,10 @@ void ArrowEffects::Update()
PerPlayerData &data = g_EffectData[pn];
if( !position.m_bFreeze || !position.m_bDelay )
{
static float fLastTime = 0;
float fTime = RageTimer::GetTimeSinceStartFast();
if( !position.m_bFreeze || !position.m_bDelay )
{
data.m_fExpandSeconds += fTime - fLastTime;
data.m_fExpandSeconds = fmodf( data.m_fExpandSeconds, PI*2 );
}
fLastTime = fTime;
data.m_fExpandSeconds += fTime - fLastTime;
data.m_fExpandSeconds = fmodf( data.m_fExpandSeconds, PI*2 );
}
// Update Tornado
@@ -211,6 +209,7 @@ void ArrowEffects::Update()
data.m_fBeatFactor *= 20.0f;
} while( false );
}
fLastTime = fTime;
}
static float GetDisplayedBeat( const PlayerState* pPlayerState, float beat )