fix "percent score continues to drop if player is dead and two players are present"
This commit is contained in:
@@ -209,9 +209,6 @@ static int GetScore(int p, int B, int S, int n)
|
|||||||
|
|
||||||
void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
||||||
{
|
{
|
||||||
if( g_CurStageStats.bFailed[m_PlayerNumber] )
|
|
||||||
return; // don't add
|
|
||||||
|
|
||||||
int &iScore = g_CurStageStats.iScore[m_PlayerNumber];
|
int &iScore = g_CurStageStats.iScore[m_PlayerNumber];
|
||||||
/*
|
/*
|
||||||
http://www.aaroninjapan.com/ddr2.html
|
http://www.aaroninjapan.com/ddr2.html
|
||||||
@@ -271,8 +268,7 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
|||||||
const int sum = (N * (N + 1)) / 2;
|
const int sum = (N * (N + 1)) / 2;
|
||||||
const int B = m_iMaxPossiblePoints/10;
|
const int B = m_iMaxPossiblePoints/10;
|
||||||
|
|
||||||
// What does this do? "Don't use a multiplier if
|
// Don't use a multiplier if the player has failed
|
||||||
// the player has failed"?
|
|
||||||
if( g_CurStageStats.bFailedEarlier[m_PlayerNumber] )
|
if( g_CurStageStats.bFailedEarlier[m_PlayerNumber] )
|
||||||
{
|
{
|
||||||
iScore += p;
|
iScore += p;
|
||||||
@@ -321,11 +317,9 @@ void ScoreKeeperMAX2::AddScore( TapNoteScore score )
|
|||||||
|
|
||||||
void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score )
|
void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score )
|
||||||
{
|
{
|
||||||
if( g_CurStageStats.bFailed[m_PlayerNumber] )
|
|
||||||
return; // don't add
|
|
||||||
|
|
||||||
if( score == TNS_HIT_MINE )
|
if( score == TNS_HIT_MINE )
|
||||||
{
|
{
|
||||||
|
if( GAMESTATE->m_HealthState[m_PlayerNumber] != GameState::DEAD )
|
||||||
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( TNS_HIT_MINE );
|
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( TNS_HIT_MINE );
|
||||||
g_CurStageStats.iTapNoteScores[m_PlayerNumber][TNS_HIT_MINE] += 1;
|
g_CurStageStats.iTapNoteScores[m_PlayerNumber][TNS_HIT_MINE] += 1;
|
||||||
}
|
}
|
||||||
@@ -333,12 +327,10 @@ void ScoreKeeperMAX2::HandleTapScore( TapNoteScore score )
|
|||||||
|
|
||||||
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
|
void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTapsInRow )
|
||||||
{
|
{
|
||||||
if( g_CurStageStats.bFailed[m_PlayerNumber] )
|
|
||||||
return; // don't add
|
|
||||||
|
|
||||||
ASSERT( iNumTapsInRow >= 1 );
|
ASSERT( iNumTapsInRow >= 1 );
|
||||||
|
|
||||||
// Update dance points.
|
// Update dance points.
|
||||||
|
if( GAMESTATE->m_HealthState[m_PlayerNumber] != GameState::DEAD )
|
||||||
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
|
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += TapNoteScoreToDancePoints( scoreOfLastTap );
|
||||||
// update judged row totals
|
// update judged row totals
|
||||||
g_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
g_CurStageStats.iTapNoteScores[m_PlayerNumber][scoreOfLastTap] += 1;
|
||||||
@@ -411,12 +403,10 @@ void ScoreKeeperMAX2::HandleTapRowScore( TapNoteScore scoreOfLastTap, int iNumTa
|
|||||||
|
|
||||||
void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
|
void ScoreKeeperMAX2::HandleHoldScore( HoldNoteScore holdScore, TapNoteScore tapScore )
|
||||||
{
|
{
|
||||||
if( g_CurStageStats.bFailed[m_PlayerNumber] )
|
|
||||||
return; // don't add
|
|
||||||
|
|
||||||
// update dance points totals
|
// update dance points totals
|
||||||
g_CurStageStats.iHoldNoteScores[m_PlayerNumber][holdScore] ++;
|
if( GAMESTATE->m_HealthState[m_PlayerNumber] != GameState::DEAD )
|
||||||
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += HoldNoteScoreToDancePoints( holdScore );
|
g_CurStageStats.iActualDancePoints[m_PlayerNumber] += HoldNoteScoreToDancePoints( holdScore );
|
||||||
|
g_CurStageStats.iHoldNoteScores[m_PlayerNumber][holdScore] ++;
|
||||||
|
|
||||||
if( holdScore == HNS_OK )
|
if( holdScore == HNS_OK )
|
||||||
AddScore( TNS_MARVELOUS );
|
AddScore( TNS_MARVELOUS );
|
||||||
|
|||||||
Reference in New Issue
Block a user