Fixed edit mode attack related crash in routine mode by not checking player options noteskin choice in routine mode.
This commit is contained in:
+12
-1
@@ -222,6 +222,18 @@ void NoteField::Load(
|
|||||||
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(),
|
ssprintf("NumTracks %d = ColsPerPlayer %d",m_pNoteData->GetNumTracks(),
|
||||||
GAMESTATE->GetCurrentStyle(m_pPlayerState->m_PlayerNumber)->m_iColsPerPlayer));
|
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.
|
// The NoteSkin may have changed at the beginning of a new course song.
|
||||||
RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin;
|
RString sNoteSkinLower = m_pPlayerState->m_PlayerOptions.GetCurrent().m_sNoteSkin;
|
||||||
|
|
||||||
@@ -265,7 +277,6 @@ void NoteField::Load(
|
|||||||
ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLower );
|
ASSERT_M( it != m_NoteDisplays.end(), sNoteSkinLower );
|
||||||
m_pDisplays[pn] = it->second;
|
m_pDisplays[pn] = it->second;
|
||||||
}
|
}
|
||||||
InitColumnRenderers();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void NoteField::InitColumnRenderers()
|
void NoteField::InitColumnRenderers()
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public:
|
|||||||
int iDrawDistanceBeforeTargetsPixels );
|
int iDrawDistanceBeforeTargetsPixels );
|
||||||
virtual void Unload();
|
virtual void Unload();
|
||||||
|
|
||||||
|
void ensure_note_displays_have_skin();
|
||||||
void InitColumnRenderers();
|
void InitColumnRenderers();
|
||||||
|
|
||||||
virtual void HandleMessage( const Message &msg );
|
virtual void HandleMessage( const Message &msg );
|
||||||
|
|||||||
Reference in New Issue
Block a user