optimize battle mode: don't call NoteField::CacheAllUsedNoteSkins every frame
This commit is contained in:
@@ -508,12 +508,6 @@ void PlayerMinus::Update( float fDeltaTime )
|
|||||||
// process transforms that are waiting to be applied
|
// process transforms that are waiting to be applied
|
||||||
ApplyWaitingTransforms();
|
ApplyWaitingTransforms();
|
||||||
|
|
||||||
/* Cache any newly-used note skins. Normally, the only new skins cached now are
|
|
||||||
* when we're adding course modifiers at the start of a song. If this is spending
|
|
||||||
* time loading skins in the middle of a song, something is wrong. */
|
|
||||||
if( m_pNoteField )
|
|
||||||
m_pNoteField->CacheAllUsedNoteSkins();
|
|
||||||
|
|
||||||
ActorFrame::Update( fDeltaTime );
|
ActorFrame::Update( fDeltaTime );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -123,6 +123,8 @@ public:
|
|||||||
ScoreKeeper* pPrimaryScoreKeeper,
|
ScoreKeeper* pPrimaryScoreKeeper,
|
||||||
ScoreKeeper* pSecondaryScoreKeeper );
|
ScoreKeeper* pSecondaryScoreKeeper );
|
||||||
|
|
||||||
|
void CacheAllUsedNoteSkins() { m_NoteField.CacheAllUsedNoteSkins(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
NoteField m_NoteField;
|
NoteField m_NoteField;
|
||||||
|
|
||||||
|
|||||||
@@ -858,6 +858,9 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
|
|||||||
GAMESTATE->m_SongOptions.FromString( a.sModifier );
|
GAMESTATE->m_SongOptions.FromString( a.sModifier );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Now that course options are applied, load any needed note skins. */
|
||||||
|
m_Player[p].CacheAllUsedNoteSkins();
|
||||||
|
|
||||||
/* Update attack bOn flags. */
|
/* Update attack bOn flags. */
|
||||||
GAMESTATE->Update(0);
|
GAMESTATE->Update(0);
|
||||||
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( p );
|
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( p );
|
||||||
|
|||||||
Reference in New Issue
Block a user