cache Noteskins from scripted course mods at song load time, not in first update after load
This commit is contained in:
@@ -41,6 +41,7 @@ public:
|
||||
void DidTapNote( int iCol, TapNoteScore score, bool bBright );
|
||||
void DidHoldNote( int iCol );
|
||||
|
||||
void RefreshBeatToNoteSkin();
|
||||
|
||||
protected:
|
||||
void DrawBeatBar( const float fBeat );
|
||||
@@ -51,8 +52,6 @@ protected:
|
||||
void DrawBGChangeText( const float fBeat, const CString sNewBGName );
|
||||
float GetWidth();
|
||||
|
||||
void RefreshBeatToNoteSkin();
|
||||
|
||||
const NoteData *m_pNoteData;
|
||||
|
||||
float m_fPercentFadeToFail; // -1 of not fading to fail
|
||||
|
||||
@@ -526,6 +526,9 @@ void Player::ApplyWaitingTransforms()
|
||||
NoteDataUtil::TransformNoteData( m_NoteData, po, GAMESTATE->GetCurrentStyle()->m_StepsType, BeatToNoteRow(fStartBeat), BeatToNoteRow(fEndBeat) );
|
||||
}
|
||||
m_pPlayerState->m_ModsToApply.clear();
|
||||
|
||||
// Cache used NoteSkins now, not on the next update.
|
||||
m_pNoteField->RefreshBeatToNoteSkin();
|
||||
}
|
||||
|
||||
void Player::DrawPrimitives()
|
||||
|
||||
@@ -861,6 +861,10 @@ void ScreenGameplay::SetupSong( PlayerNumber p, int iSongIndex )
|
||||
GAMESTATE->m_SongOptions.FromString( a.sModifier );
|
||||
}
|
||||
|
||||
// UGLY: Force updating the BeatToNoteSkin mapping and cache NoteSkins now, or else
|
||||
// we'll do it on the first update and skip.
|
||||
m_Player[p].ApplyWaitingTransforms();
|
||||
|
||||
/* Now that course options are applied, load any needed note skins and unload old ones. */
|
||||
m_Player[p].CacheAllUsedNoteSkins( true );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user