Fixed edit mode attack related crash in routine mode by not checking player options noteskin choice in routine mode.
This commit is contained in:
+13
-2
@@ -221,7 +221,19 @@ void NoteField::Load(
|
||||
ASSERT_M(m_pNoteData->GetNumTracks() == GAMESTATE->GetCurrentStyle(m_pPlayerState->m_PlayerNumber)->m_iColsPerPlayer,
|
||||
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(),
|
||||
GAMESTATE->GetCurrentStyle(m_pPlayerState->m_PlayerNumber)->m_iColsPerPlayer));
|
||||
|
||||
|
||||
// If we're in routine mode, the noteskin is forcibly set to the routine
|
||||
// noteskin metrics (which is bad in its own way). The noteskin set in the
|
||||
// options is ignored and probably already set anyway. -Kyz
|
||||
if(GAMESTATE->GetCurrentStyle(m_pPlayerState->m_PlayerNumber)->m_StyleType != StyleType_TwoPlayersSharedSides)
|
||||
{
|
||||
ensure_note_displays_have_skin();
|
||||
}
|
||||
InitColumnRenderers();
|
||||
}
|
||||
|
||||
void NoteField::ensure_note_displays_have_skin()
|
||||
{
|
||||
// The NoteSkin may have changed at the beginning of a new course song.
|
||||
RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin;
|
||||
|
||||
@@ -265,7 +277,6 @@ void NoteField::Load(
|
||||
ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLower );
|
||||
m_pDisplays[pn] = it->second;
|
||||
}
|
||||
InitColumnRenderers();
|
||||
}
|
||||
|
||||
void NoteField::InitColumnRenderers()
|
||||
|
||||
@@ -31,6 +31,7 @@ public:
|
||||
int iDrawDistanceBeforeTargetsPixels );
|
||||
virtual void Unload();
|
||||
|
||||
void ensure_note_displays_have_skin();
|
||||
void InitColumnRenderers();
|
||||
|
||||
virtual void HandleMessage( const Message &msg );
|
||||
|
||||
Reference in New Issue
Block a user