From a49787da67199e2526e411b07457f29b73c6b583 Mon Sep 17 00:00:00 2001 From: Steve Checkoway Date: Sat, 24 Jun 2006 03:31:16 +0000 Subject: [PATCH] Shared players will only be using the master player's NoteData, Check that the track actually exists before attempting to use it. --- stepmania/src/AutoKeysounds.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stepmania/src/AutoKeysounds.cpp b/stepmania/src/AutoKeysounds.cpp index 80a0ff6808..9ed07929d0 100644 --- a/stepmania/src/AutoKeysounds.cpp +++ b/stepmania/src/AutoKeysounds.cpp @@ -70,6 +70,9 @@ void AutoKeysounds::FinishLoading() int iNextRow = INT_MAX; FOREACH_EnabledPlayer(pn) { + // XXX Hack. Enabled players need not have their own note data. + if( t >= m_ndAutoKeysoundsOnly[pn].GetNumTracks() ) + continue; int iNextRowForPlayer = iRow; if( m_ndAutoKeysoundsOnly[pn].GetNextTapNoteRowForTrack( t, iNextRowForPlayer ) ) iNextRow = min( iNextRow, iNextRowForPlayer );