Player::Update: Don't round for CrossedRow + explanation.
GetClosestNoteDirectional: Always round up, so we always look far enough. It's harmless to look a little too far. Fixes not being able to hit a note .5 of a note row too soon--there was small window in which you hadn't been graded and should have been able to register a boo, but steps were ignored. (This showed up in MAX3.)
This commit is contained in:
@@ -288,7 +288,11 @@ void Player::Update( float fDeltaTime )
|
|||||||
m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin;
|
m_sLastSeenNoteSkin = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_sNoteSkin;
|
||||||
} */
|
} */
|
||||||
|
|
||||||
const int iRowNow = BeatToNoteRow( GAMESTATE->m_fSongBeat );
|
// Why was this originally "BeatToNoteRowNotRounded"? It should be rounded. -Chris
|
||||||
|
/* We want to send the crossed row message exactly when we cross the row--not
|
||||||
|
* .5 before the row. Use MAX3 as a test case: without rounding, autoplay steps
|
||||||
|
* early. -glenn */
|
||||||
|
const int iRowNow = BeatToNoteRowNotRounded( GAMESTATE->m_fSongBeat );
|
||||||
if( iRowNow >= 0 )
|
if( iRowNow >= 0 )
|
||||||
{
|
{
|
||||||
for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update
|
for( ; m_iRowLastCrossed <= iRowNow; m_iRowLastCrossed++ ) // for each index we crossed since the last update
|
||||||
@@ -343,13 +347,16 @@ void Player::DrawPrimitives()
|
|||||||
m_HoldJudgment[c].Draw();
|
m_HoldJudgment[c].Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* It's OK for this function to search a little more than was requested. */
|
||||||
int Player::GetClosestNoteDirectional( int col, float fBeat, float fMaxBeatsDistance, int iDirection )
|
int Player::GetClosestNoteDirectional( int col, float fBeat, float fMaxBeatsDistance, int iDirection )
|
||||||
{
|
{
|
||||||
// look for the closest matching step
|
// look for the closest matching step
|
||||||
const int iIndexStartLookingAt = BeatToNoteRow( fBeat );
|
const int iIndexStartLookingAt = BeatToNoteRow( fBeat );
|
||||||
|
|
||||||
// number of elements to examine on either end of iIndexStartLookingAt
|
/* Number of elements to examine on either end of iIndexStartLookingAt. Make
|
||||||
const int iNumElementsToExamine = BeatToNoteRow( fMaxBeatsDistance );
|
* sure we always round up. */
|
||||||
|
const int iNumElementsToExamine = BeatToNoteRow( fMaxBeatsDistance + 1 );
|
||||||
|
|
||||||
// Start at iIndexStartLookingAt and search outward.
|
// Start at iIndexStartLookingAt and search outward.
|
||||||
for( int delta=0; delta < iNumElementsToExamine; delta++ )
|
for( int delta=0; delta < iNumElementsToExamine; delta++ )
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user