don't disqualify for mods that have no effect on the current song or course
This commit is contained in:
@@ -897,9 +897,18 @@ void GameState::RestoreSelectedOptions()
|
|||||||
bool GameState::IsDisqualified( PlayerNumber pn )
|
bool GameState::IsDisqualified( PlayerNumber pn )
|
||||||
{
|
{
|
||||||
if( GAMESTATE->IsCourseMode() )
|
if( GAMESTATE->IsCourseMode() )
|
||||||
return GAMESTATE->m_PlayerOptions[pn].IsHandicapForCourse( GAMESTATE->m_pCurCourse );
|
{
|
||||||
|
return GAMESTATE->m_PlayerOptions[pn].IsEasierForCourse(
|
||||||
|
GAMESTATE->m_pCurCourse,
|
||||||
|
GAMESTATE->GetCurrentStyleDef()->m_StepsType,
|
||||||
|
GAMESTATE->m_PreferredCourseDifficulty[pn] );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return GAMESTATE->m_PlayerOptions[pn].IsHandicapForSong( GAMESTATE->m_pCurSong );
|
{
|
||||||
|
return GAMESTATE->m_PlayerOptions[pn].IsEasierForSongAndSteps(
|
||||||
|
GAMESTATE->m_pCurSong,
|
||||||
|
GAMESTATE->m_pCurNotes[pn] );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameState::ResetNoteSkins()
|
void GameState::ResetNoteSkins()
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
#include "NoteSkinManager.h"
|
#include "NoteSkinManager.h"
|
||||||
#include "song.h"
|
#include "song.h"
|
||||||
#include "Course.h"
|
#include "Course.h"
|
||||||
|
#include "Steps.h"
|
||||||
|
|
||||||
#define ONE( arr ) { for( unsigned Z = 0; Z < ARRAYSIZE(arr); ++Z ) arr[Z]=1.0f; }
|
#define ONE( arr ) { for( unsigned Z = 0; Z < ARRAYSIZE(arr); ++Z ) arr[Z]=1.0f; }
|
||||||
|
|
||||||
@@ -540,29 +541,41 @@ bool PlayerOptions::operator==( const PlayerOptions &other ) const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlayerOptions::IsHandicapForSong( Song* pSong )
|
bool PlayerOptions::IsEasierForSongAndSteps( Song* pSong, Steps* pSteps )
|
||||||
{
|
{
|
||||||
if( m_bTimeSpacing && pSong->HasSignificantBpmChangesOrStops() )
|
if( m_bTimeSpacing && pSong->HasSignificantBpmChangesOrStops() )
|
||||||
return true;
|
return true;
|
||||||
|
if( m_bTransforms[TRANSFORM_NOHOLDS] && pSteps->GetRadarValues()[RADAR_NUM_HOLDS]>0 )
|
||||||
|
return true;
|
||||||
|
if( m_bTransforms[TRANSFORM_NOMINES] && pSteps->GetRadarValues()[RADAR_NUM_MINES]>0 )
|
||||||
|
return true;
|
||||||
|
if( m_bTransforms[TRANSFORM_NOHANDS] && pSteps->GetRadarValues()[RADAR_NUM_HANDS]>0 )
|
||||||
|
return true;
|
||||||
|
if( m_bTransforms[TRANSFORM_NOQUADS] && pSteps->GetRadarValues()[RADAR_NUM_HANDS]>0 )
|
||||||
|
return true;
|
||||||
|
if( m_bTransforms[TRANSFORM_NOJUMPS] && pSteps->GetRadarValues()[RADAR_NUM_JUMPS]>0 )
|
||||||
|
return true;
|
||||||
|
|
||||||
if( m_bTransforms[TRANSFORM_NOHOLDS] ) return true;
|
// Inserted holds can be really easy on some songs, and scores will be
|
||||||
if( m_bTransforms[TRANSFORM_NOMINES] ) return true;
|
// highly hold-weighted, and very little tap score weighted.
|
||||||
if( m_bTransforms[TRANSFORM_NOJUMPS] ) return true;
|
|
||||||
if( m_bTransforms[TRANSFORM_NOHANDS] ) return true;
|
|
||||||
if( m_bTransforms[TRANSFORM_NOQUADS] ) return true;
|
|
||||||
if( m_bTransforms[TRANSFORM_PLANTED] ) return true;
|
if( m_bTransforms[TRANSFORM_PLANTED] ) return true;
|
||||||
if( m_bTransforms[TRANSFORM_TWISTER] ) return true;
|
if( m_bTransforms[TRANSFORM_TWISTER] ) return true;
|
||||||
|
|
||||||
|
// This makes songs with sparse notes easier.
|
||||||
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
|
if( m_bTransforms[TRANSFORM_ECHO] ) return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PlayerOptions::IsHandicapForCourse( Course* pCourse )
|
bool PlayerOptions::IsEasierForCourse( Course* pCourse, StepsType st, CourseDifficulty cd )
|
||||||
{
|
{
|
||||||
for( unsigned i=0; i<pCourse->m_entries.size(); i++ )
|
vector<Course::Info> ci;
|
||||||
|
pCourse->GetCourseInfo( st, ci, cd );
|
||||||
|
|
||||||
|
for( unsigned i=0; i<ci.size(); i++ )
|
||||||
{
|
{
|
||||||
const CourseEntry& ce = pCourse->m_entries[i];
|
const Course::Info& info = ci[i];
|
||||||
if( ce.pSong && IsHandicapForSong(ce.pSong) )
|
if( info.pSong && IsEasierForSongAndSteps(info.pSong, info.pNotes) )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -12,8 +12,11 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
class Song;
|
class Song;
|
||||||
|
class Steps;
|
||||||
class Course;
|
class Course;
|
||||||
|
|
||||||
|
#include "GameConstantsAndTypes.h"
|
||||||
|
|
||||||
struct PlayerOptions
|
struct PlayerOptions
|
||||||
{
|
{
|
||||||
PlayerOptions() { Init(); };
|
PlayerOptions() { Init(); };
|
||||||
@@ -140,8 +143,8 @@ struct PlayerOptions
|
|||||||
|
|
||||||
|
|
||||||
// return true if any mods being used will make the song(s) easier
|
// return true if any mods being used will make the song(s) easier
|
||||||
bool IsHandicapForSong( Song* pSong );
|
bool IsEasierForSongAndSteps( Song* pSong, Steps* pSteps );
|
||||||
bool IsHandicapForCourse( Course* pCourse );
|
bool IsEasierForCourse( Course* pCourse, StepsType st, CourseDifficulty cd );
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user