fix PO updating (fixes note skins in courses)
This commit is contained in:
@@ -46,6 +46,8 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
|||||||
{
|
{
|
||||||
#define APPROACH( opt ) \
|
#define APPROACH( opt ) \
|
||||||
fapproach( m_ ## opt, other.m_ ## opt, fDeltaSeconds * other.m_Speed ## opt );
|
fapproach( m_ ## opt, other.m_ ## opt, fDeltaSeconds * other.m_Speed ## opt );
|
||||||
|
#define DO_COPY( x ) \
|
||||||
|
x = other.x;
|
||||||
|
|
||||||
APPROACH( fTimeSpacing );
|
APPROACH( fTimeSpacing );
|
||||||
APPROACH( fScrollSpeed );
|
APPROACH( fScrollSpeed );
|
||||||
@@ -65,7 +67,19 @@ void PlayerOptions::Approach( const PlayerOptions& other, float fDeltaSeconds )
|
|||||||
APPROACH( fSkew );
|
APPROACH( fSkew );
|
||||||
APPROACH( fPassmark );
|
APPROACH( fPassmark );
|
||||||
APPROACH( fRandomSpeed );
|
APPROACH( fRandomSpeed );
|
||||||
|
|
||||||
|
DO_COPY( m_bSetScrollSpeed );
|
||||||
|
DO_COPY( m_bSetTiltOrSkew );
|
||||||
|
for( int i=0; i<NUM_TURNS; i++ )
|
||||||
|
DO_COPY( m_bTurns[i] );
|
||||||
|
for( int i=0; i<NUM_TRANSFORMS; i++ )
|
||||||
|
DO_COPY( m_bTransforms[i] );
|
||||||
|
DO_COPY( m_bMuteOnError );
|
||||||
|
DO_COPY( m_ScoreDisplay );
|
||||||
|
DO_COPY( m_FailType );
|
||||||
|
DO_COPY( m_sNoteSkin );
|
||||||
#undef APPROACH
|
#undef APPROACH
|
||||||
|
#undef DO_COPY
|
||||||
}
|
}
|
||||||
|
|
||||||
static void AddPart( vector<RString> &AddTo, float level, RString name )
|
static void AddPart( vector<RString> &AddTo, float level, RString name )
|
||||||
|
|||||||
@@ -48,8 +48,6 @@ void PlayerState::Reset()
|
|||||||
|
|
||||||
void PlayerState::Update( float fDelta )
|
void PlayerState::Update( float fDelta )
|
||||||
{
|
{
|
||||||
m_PlayerOptions.Update( fDelta );
|
|
||||||
|
|
||||||
// TRICKY: GAMESTATE->Update is run before any of the Screen update's,
|
// TRICKY: GAMESTATE->Update is run before any of the Screen update's,
|
||||||
// so we'll clear these flags here and let them get turned on later
|
// so we'll clear these flags here and let them get turned on later
|
||||||
m_bAttackBeganThisUpdate = false;
|
m_bAttackBeganThisUpdate = false;
|
||||||
@@ -88,6 +86,9 @@ void PlayerState::Update( float fDelta )
|
|||||||
if( bRebuildPlayerOptions )
|
if( bRebuildPlayerOptions )
|
||||||
RebuildPlayerOptionsFromActiveAttacks();
|
RebuildPlayerOptionsFromActiveAttacks();
|
||||||
|
|
||||||
|
/* Update after enabling attacks, so we appraoch the new state. */
|
||||||
|
m_PlayerOptions.Update( fDelta );
|
||||||
|
|
||||||
if( m_fSecondsUntilAttacksPhasedOut > 0 )
|
if( m_fSecondsUntilAttacksPhasedOut > 0 )
|
||||||
m_fSecondsUntilAttacksPhasedOut = max( 0, m_fSecondsUntilAttacksPhasedOut - fDelta );
|
m_fSecondsUntilAttacksPhasedOut = max( 0, m_fSecondsUntilAttacksPhasedOut - fDelta );
|
||||||
}
|
}
|
||||||
@@ -103,7 +104,7 @@ void PlayerState::ResetToDefaultPlayerOptions( ModsLevel l )
|
|||||||
* is set. This is also called by GameState::Update when activating a queued attack. */
|
* is set. This is also called by GameState::Update when activating a queued attack. */
|
||||||
void PlayerState::LaunchAttack( const Attack& a )
|
void PlayerState::LaunchAttack( const Attack& a )
|
||||||
{
|
{
|
||||||
LOG->Trace( "Launch attack '%s' against P%d at %f", a.sModifiers.c_str(), m_mp+1, a.fStartSecond );
|
LOG->Trace( "Launch attack '%s' against P%d at %f", a.sModifiers.c_str(), m_PlayerNumber+1, a.fStartSecond );
|
||||||
|
|
||||||
Attack attack = a;
|
Attack attack = a;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user