Fixed edit mode attack related crash in routine mode by not checking player options noteskin choice in routine mode.

This commit is contained in:
Kyzentun Keeslala
2016-06-17 16:23:08 -06:00
parent 1deb1dd9c0
commit 7daaf04cfc
2 changed files with 14 additions and 2 deletions
+13 -2
View File
@@ -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()
+1
View File
@@ -31,6 +31,7 @@ public:
int iDrawDistanceBeforeTargetsPixels );
virtual void Unload();
void ensure_note_displays_have_skin();
void InitColumnRenderers();
virtual void HandleMessage( const Message &msg );