Fix Expand, possibly other mods, for 2nd player.
This commit is contained in:
@@ -8,6 +8,11 @@ ________________________________________________________________________________
|
|||||||
StepMania 5.0 $next | 2011xxxx
|
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
|
2011/10/29
|
||||||
----------
|
----------
|
||||||
* [GameState] Add the ResetPlayerOptions lua binding. [Wolfman2000]
|
* [GameState] Add the ResetPlayerOptions lua binding. [Wolfman2000]
|
||||||
|
|||||||
@@ -84,6 +84,9 @@ void ArrowEffects::Update()
|
|||||||
{
|
{
|
||||||
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
const Style* pStyle = GAMESTATE->GetCurrentStyle();
|
||||||
|
|
||||||
|
static float fLastTime = 0;
|
||||||
|
float fTime = RageTimer::GetTimeSinceStartFast();
|
||||||
|
|
||||||
FOREACH_PlayerNumber( pn )
|
FOREACH_PlayerNumber( pn )
|
||||||
{
|
{
|
||||||
const Style::ColumnInfo* pCols = pStyle->m_ColumnInfo[pn];
|
const Style::ColumnInfo* pCols = pStyle->m_ColumnInfo[pn];
|
||||||
@@ -92,16 +95,11 @@ void ArrowEffects::Update()
|
|||||||
|
|
||||||
PerPlayerData &data = g_EffectData[pn];
|
PerPlayerData &data = g_EffectData[pn];
|
||||||
|
|
||||||
{
|
|
||||||
static float fLastTime = 0;
|
|
||||||
float fTime = RageTimer::GetTimeSinceStartFast();
|
|
||||||
if( !position.m_bFreeze || !position.m_bDelay )
|
if( !position.m_bFreeze || !position.m_bDelay )
|
||||||
{
|
{
|
||||||
data.m_fExpandSeconds += fTime - fLastTime;
|
data.m_fExpandSeconds += fTime - fLastTime;
|
||||||
data.m_fExpandSeconds = fmodf( data.m_fExpandSeconds, PI*2 );
|
data.m_fExpandSeconds = fmodf( data.m_fExpandSeconds, PI*2 );
|
||||||
}
|
}
|
||||||
fLastTime = fTime;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update Tornado
|
// Update Tornado
|
||||||
for( int iColNum = 0; iColNum < MAX_COLS_PER_PLAYER; ++iColNum )
|
for( int iColNum = 0; iColNum < MAX_COLS_PER_PLAYER; ++iColNum )
|
||||||
@@ -211,6 +209,7 @@ void ArrowEffects::Update()
|
|||||||
data.m_fBeatFactor *= 20.0f;
|
data.m_fBeatFactor *= 20.0f;
|
||||||
} while( false );
|
} while( false );
|
||||||
}
|
}
|
||||||
|
fLastTime = fTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
static float GetDisplayedBeat( const PlayerState* pPlayerState, float beat )
|
static float GetDisplayedBeat( const PlayerState* pPlayerState, float beat )
|
||||||
|
|||||||
Reference in New Issue
Block a user