fixed erroneous meter total on NameEntry
fixed incorrect judging at non 1.0 music rates
This commit is contained in:
@@ -351,7 +351,7 @@ void Player::DrawPrimitives()
|
||||
m_HoldJudgement[c].Draw();
|
||||
}
|
||||
|
||||
int Player::GetClosestBeatDirectional( int col, float fBeat, float fMaxSecondsDistance, int iDirection )
|
||||
int Player::GetClosestNoteDirectional( int col, float fBeat, float fMaxSecondsDistance, int iDirection )
|
||||
{
|
||||
// look for the closest matching step
|
||||
const int iIndexStartLookingAt = BeatToNoteRow( fBeat );
|
||||
@@ -374,10 +374,10 @@ int Player::GetClosestBeatDirectional( int col, float fBeat, float fMaxSecondsDi
|
||||
return -1;
|
||||
}
|
||||
|
||||
int Player::GetClosestBeat( int col, float fBeat, float fMaxBeatsAhead, float fMaxBeatsBehind )
|
||||
int Player::GetClosestNote( int col, float fBeat, float fMaxBeatsAhead, float fMaxBeatsBehind )
|
||||
{
|
||||
int Fwd = GetClosestBeatDirectional(col, fBeat, fMaxBeatsAhead, 1);
|
||||
int Back = GetClosestBeatDirectional(col, fBeat, fMaxBeatsBehind, -1);
|
||||
int Fwd = GetClosestNoteDirectional(col, fBeat, fMaxBeatsAhead, 1);
|
||||
int Back = GetClosestNoteDirectional(col, fBeat, fMaxBeatsBehind, -1);
|
||||
|
||||
if(Fwd == -1 && Back == -1) return -1;
|
||||
if(Fwd == -1) return Back;
|
||||
@@ -400,7 +400,7 @@ void Player::Step( int col )
|
||||
|
||||
ASSERT( col >= 0 && col <= GetNumTracks() );
|
||||
|
||||
int iIndexOverlappingNote = GetClosestBeat( col, GAMESTATE->m_fSongBeat,
|
||||
int iIndexOverlappingNote = GetClosestNote( col, GAMESTATE->m_fSongBeat,
|
||||
GAMESTATE->m_fCurBPS * GAMESTATE->m_SongOptions.m_fMusicRate,
|
||||
GAMESTATE->m_fCurBPS * GAMESTATE->m_SongOptions.m_fMusicRate );
|
||||
|
||||
@@ -412,12 +412,13 @@ void Player::Step( int col )
|
||||
{
|
||||
// compute the score for this hit
|
||||
const float fStepBeat = NoteRowToBeat( (float)iIndexOverlappingNote );
|
||||
// const float fBeatsUntilStep = fStepBeat - fSongBeat;
|
||||
|
||||
const float fStepSeconds = GAMESTATE->m_pCurSong->GetElapsedTimeFromBeat(fStepBeat);
|
||||
|
||||
// The offset from the actual step in seconds:
|
||||
const float fNoteOffset = fStepSeconds - GAMESTATE->m_fMusicSeconds;
|
||||
// const float fNoteOffset = fBeatsUntilStep / GAMESTATE->m_fCurBPS;
|
||||
const float fSecondsFromPerfect = fabsf( fNoteOffset );
|
||||
|
||||
const float fSecondsFromPerfect = fabsf( fNoteOffset ) / GAMESTATE->m_SongOptions.m_fMusicRate; // account for music rate
|
||||
|
||||
|
||||
TapNoteScore score;
|
||||
|
||||
@@ -58,8 +58,8 @@ protected:
|
||||
void HandleNoteScore( TapNoteScore score, int iNumTapsInRow );
|
||||
void HandleHoldNoteScore( HoldNoteScore score, TapNoteScore TapNoteScore );
|
||||
|
||||
int GetClosestBeatDirectional( int col, float fBeat, float fMaxBeatsAhead, int iDirection );
|
||||
int GetClosestBeat( int col, float fBeat, float fMaxBeatsAhead, float fMaxBeatsBehind );
|
||||
int GetClosestNoteDirectional( int col, float fBeat, float fMaxBeatsAhead, int iDirection );
|
||||
int GetClosestNote( int col, float fBeat, float fMaxBeatsAhead, float fMaxBeatsBehind );
|
||||
|
||||
static float GetMaxStepDistanceSeconds();
|
||||
|
||||
|
||||
@@ -189,7 +189,7 @@ ScreenNameEntry::ScreenNameEntry()
|
||||
m_textCategory[p].LoadFromFont( THEME->GetPathTo("Fonts","header2") );
|
||||
m_textCategory[p].SetX( (float)GAMESTATE->GetCurrentStyleDef()->m_iCenterX[p] );
|
||||
m_textCategory[p].SetY( CATEGORY_Y );
|
||||
CString sCategoryText = ssprintf("No. %d", GAMESTATE->m_iRankingIndex[p]+1);
|
||||
CString sCategoryText = ssprintf("No. %d in\n", GAMESTATE->m_iRankingIndex[p]+1);
|
||||
switch( GAMESTATE->m_PlayMode )
|
||||
{
|
||||
case PLAY_MODE_ARCADE:
|
||||
@@ -197,13 +197,13 @@ ScreenNameEntry::ScreenNameEntry()
|
||||
StageStats SS;
|
||||
vector<Song*> vSongs;
|
||||
GAMESTATE->GetFinalEvalStatsAndSongs( SS, vSongs );
|
||||
sCategoryText += ssprintf(" in Type %c (%d)", 'A'+GAMESTATE->m_RankingCategory[p], SS.iMeter );
|
||||
sCategoryText += ssprintf("Type %c (%d)", 'A'+GAMESTATE->m_RankingCategory[p], SS.iMeter[p] );
|
||||
}
|
||||
break;
|
||||
case PLAY_MODE_NONSTOP:
|
||||
case PLAY_MODE_ONI:
|
||||
case PLAY_MODE_ENDLESS:
|
||||
sCategoryText += ssprintf(" in \n%s", GAMESTATE->m_pCurCourse->m_sName.c_str());
|
||||
sCategoryText += ssprintf("%s", GAMESTATE->m_pCurCourse->m_sName.c_str());
|
||||
break;
|
||||
default:
|
||||
ASSERT(0);
|
||||
|
||||
Reference in New Issue
Block a user