Explicitly get song bpm when checking if song matches songCriteria (m_fSpecifiedBPMMax and m_fSpecifiedBPMMin are only set if #DISPLAYBPM is used in simfile)
This commit is contained in:
+11
-7
@@ -83,14 +83,18 @@ bool SongCriteria::Matches( const Song *pSong ) const
|
||||
if( m_iMaxStagesForSong != -1 && GAMESTATE->GetNumStagesMultiplierForSong(pSong) > m_iMaxStagesForSong )
|
||||
return false;
|
||||
|
||||
if( m_fMaxBPM != -1 && pSong->m_fSpecifiedBPMMax > m_fMaxBPM )
|
||||
if(m_fMaxBPM != -1 && m_fMinBPM != -1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( m_fMinBPM != -1 && pSong->m_fSpecifiedBPMMin < m_fMinBPM )
|
||||
{
|
||||
return false;
|
||||
DisplayBpms bpms;
|
||||
pSong->GetDisplayBpms(bpms);
|
||||
if(bpms.GetMax() > m_fMaxBPM)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(bpms.GetMin() < m_fMinBPM)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if( m_fMinDurationSeconds != -1 && pSong->m_fMusicLengthSeconds < m_fMinDurationSeconds )
|
||||
|
||||
Reference in New Issue
Block a user