hack in SGameplay to allow simplifications elsewhere
only cache the current note skin
This commit is contained in:
@@ -77,12 +77,8 @@ void NoteField::CacheNoteSkin( const CString &sNoteSkin_ )
|
|||||||
|
|
||||||
void NoteField::CacheAllUsedNoteSkins()
|
void NoteField::CacheAllUsedNoteSkins()
|
||||||
{
|
{
|
||||||
/* Cache all note skins that we might need for the whole song, course or battle
|
CString sNoteSkin = m_pPlayerState->m_PlayerOptions.m_sNoteSkin;
|
||||||
* play, so we don't have to load them later (such as between course songs). */
|
CacheNoteSkin( sNoteSkin );
|
||||||
vector<CString> skins;
|
|
||||||
GAMESTATE->GetAllUsedNoteSkins( skins );
|
|
||||||
for( unsigned i=0; i < skins.size(); ++i )
|
|
||||||
CacheNoteSkin( skins[i] );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteField::Init( const PlayerState* pPlayerState, float fYReverseOffsetPixels )
|
void NoteField::Init( const PlayerState* pPlayerState, float fYReverseOffsetPixels )
|
||||||
|
|||||||
@@ -981,6 +981,27 @@ void ScreenGameplay::SetupSong( int iSongIndex )
|
|||||||
NoteData ndTransformed;
|
NoteData ndTransformed;
|
||||||
pStyle->GetTransformedNoteDataForStyle( pi->GetStepsAndTrailIndex(), originalNoteData, ndTransformed );
|
pStyle->GetTransformedNoteDataForStyle( pi->GetStepsAndTrailIndex(), originalNoteData, ndTransformed );
|
||||||
|
|
||||||
|
// HACK: Apply NoteSkins from global course options. Do this before Player::Load,
|
||||||
|
// since it needs to know which note skin to load.
|
||||||
|
pi->GetPlayerState()->m_ModsToApply.clear();
|
||||||
|
for( unsigned i=0; i<pi->m_asModifiersQueue[iSongIndex].size(); ++i )
|
||||||
|
{
|
||||||
|
Attack a = pi->m_asModifiersQueue[iSongIndex][i];
|
||||||
|
if( a.fStartSecond != 0 )
|
||||||
|
continue;
|
||||||
|
a.fStartSecond = -1; // now
|
||||||
|
|
||||||
|
PlayerOptions po;
|
||||||
|
po.FromString( a.sModifiers );
|
||||||
|
if( po.m_sNoteSkin.empty() )
|
||||||
|
continue;
|
||||||
|
a.sModifiers = po.m_sNoteSkin;
|
||||||
|
|
||||||
|
GAMESTATE->LaunchAttack( pi->GetPlayerStateAndStageStatsIndex(), a );
|
||||||
|
GAMESTATE->m_SongOptions.FromString( a.sModifiers );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// load player
|
// load player
|
||||||
{
|
{
|
||||||
NoteData nd = ndTransformed;
|
NoteData nd = ndTransformed;
|
||||||
|
|||||||
Reference in New Issue
Block a user