fix up a rather fear-inspiring conditional
This commit is contained in:
+14
-7
@@ -697,13 +697,20 @@ void Song::ReCalculateRadarValuesAndLastBeat()
|
||||
void Song::GetNotes( vector<Notes*>& arrayAddTo, NotesType nt, Difficulty dc, int iMeterLow, int iMeterHigh, CString sDescription, bool bIncludeAutoGen ) const
|
||||
{
|
||||
for( unsigned i=0; i<m_apNotes.size(); i++ ) // for each of the Song's Notes
|
||||
if( m_apNotes[i]->m_NotesType == nt )
|
||||
if( dc==DIFFICULTY_INVALID || dc==m_apNotes[i]->GetDifficulty() )
|
||||
if( iMeterLow==-1 || iMeterLow<=m_apNotes[i]->GetMeter() )
|
||||
if( iMeterHigh==-1 || iMeterHigh>=m_apNotes[i]->GetMeter() )
|
||||
if( sDescription=="" || sDescription==m_apNotes[i]->GetDescription() )
|
||||
if( bIncludeAutoGen || !m_apNotes[i]->IsAutogen() )
|
||||
arrayAddTo.push_back( m_apNotes[i] );
|
||||
{
|
||||
if( m_apNotes[i]->m_NotesType != nt ) continue;
|
||||
if( dc != DIFFICULTY_INVALID && dc != m_apNotes[i]->GetDifficulty() )
|
||||
continue;
|
||||
if( iMeterLow != -1 && iMeterLow > m_apNotes[i]->GetMeter() )
|
||||
continue;
|
||||
if( iMeterHigh != -1 && iMeterHigh < m_apNotes[i]->GetMeter() )
|
||||
continue;
|
||||
if( sDescription != "" && sDescription != m_apNotes[i]->GetDescription() )
|
||||
continue;
|
||||
if( !bIncludeAutoGen && m_apNotes[i]->IsAutogen() )
|
||||
continue;
|
||||
arrayAddTo.push_back( m_apNotes[i] );
|
||||
}
|
||||
}
|
||||
|
||||
Notes* Song::GetNotes( NotesType nt, Difficulty dc, bool bIncludeAutoGen ) const
|
||||
|
||||
Reference in New Issue
Block a user