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
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
@@ -123,6 +123,8 @@ public:
|
||||
ScoreKeeper* pPrimaryScoreKeeper,
|
||||
ScoreKeeper* pSecondaryScoreKeeper );
|
||||
|
||||
void CacheAllUsedNoteSkins() { m_NoteField.CacheAllUsedNoteSkins(); }
|
||||
|
||||
protected:
|
||||
NoteField m_NoteField;
|
||||
|
||||
|
||||
@@ -858,6 +858,9 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
|
||||
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. */
|
||||
GAMESTATE->Update(0);
|
||||
GAMESTATE->RebuildPlayerOptionsFromActiveAttacks( p );
|
||||
|
||||
Reference in New Issue
Block a user