Skip to content

Commit

Permalink
Don't check if the row is judgeable in HandleTapRowScore because in e…
Browse files Browse the repository at this point in the history
…very use case this has already been done. Set StepSearchDistance with GetMaxStepDistance rather than it always being 1 second.
  • Loading branch information
xwidghet committed Aug 24, 2016
1 parent eed2f6e commit d412cbf
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,12 +96,6 @@ class JudgedRows

RString ATTACK_DISPLAY_X_NAME( size_t p, size_t both_sides ) { return "AttackDisplayXOffset" + (both_sides ? RString("BothSides") : ssprintf("OneSideP%d",int(p+1)) ); }

/**
* @brief Distance to search for a note in Step(), in seconds.
*
* TODO: This should be calculated based on the max size of the current judgment windows. */
static const float StepSearchDistance = 1.0f;

void TimingWindowSecondsInit( size_t /*TimingWindow*/ i, RString &sNameOut, float &defaultValueOut )
{
sNameOut = "TimingWindowSeconds" + TimingWindowToString( (TimingWindow)i );
Expand Down Expand Up @@ -2109,6 +2103,8 @@ void Player::Step( int col, int row, const RageTimer &tm, bool bHeld, bool bRele
* Either option would fundamentally change the grading of two quick notes
* "jack hammers." Hmm.
*/
static const float StepSearchDistance = GetMaxStepDistanceSeconds();

const int iStepSearchRows = max(
BeatToNoteRow( m_Timing->GetBeatFromElapsedTime( m_pPlayerState->m_Position.m_fMusicSeconds + StepSearchDistance ) ) - iSongRow,
iSongRow - BeatToNoteRow( m_Timing->GetBeatFromElapsedTime( m_pPlayerState->m_Position.m_fMusicSeconds - StepSearchDistance ) )
Expand Down Expand Up @@ -2848,10 +2844,6 @@ void Player::HandleTapRowScore( unsigned row )
bNoCheating = false;
#endif

// Do not score rows in WarpSegments or FakeSegments
if (!m_Timing->IsJudgableAtRow(row))
return;

if( GAMESTATE->m_bDemonstrationOrJukebox )
bNoCheating = false;
// don't accumulate points if AutoPlay is on.
Expand Down

0 comments on commit d412cbf

Please sign in to comment.