remove bFailedEarlier
This commit is contained in:
@@ -254,7 +254,7 @@ void LifeMeterBar::ChangeLife( float fDeltaLife )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if this step would cause a fail
|
// check if this step would empty the bar
|
||||||
if( m_fLifePercentage + fDeltaLife <= 0 && m_fLifePercentage > 0 )
|
if( m_fLifePercentage + fDeltaLife <= 0 && m_fLifePercentage > 0 )
|
||||||
{
|
{
|
||||||
/* Increase by m_iRegenComboAfterFail; never push it beyond m_iMaxRegenComboAfterFail
|
/* Increase by m_iRegenComboAfterFail; never push it beyond m_iMaxRegenComboAfterFail
|
||||||
@@ -267,9 +267,6 @@ void LifeMeterBar::ChangeLife( float fDeltaLife )
|
|||||||
m_fLifePercentage += fDeltaLife;
|
m_fLifePercentage += fDeltaLife;
|
||||||
CLAMP( m_fLifePercentage, 0, 1 );
|
CLAMP( m_fLifePercentage, 0, 1 );
|
||||||
AfterLifeChanged();
|
AfterLifeChanged();
|
||||||
|
|
||||||
if( m_fLifePercentage <= 0 )
|
|
||||||
m_pPlayerStageStats->bFailedEarlier = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifeMeterBar::AfterLifeChanged()
|
void LifeMeterBar::AfterLifeChanged()
|
||||||
@@ -297,7 +294,7 @@ bool LifeMeterBar::IsInDanger() const
|
|||||||
|
|
||||||
bool LifeMeterBar::IsFailing() const
|
bool LifeMeterBar::IsFailing() const
|
||||||
{
|
{
|
||||||
return m_fLifePercentage <= 0;
|
return m_fLifePercentage <= m_pPlayerState->m_PlayerOptions.GetCurrent().m_fPassmark;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ void LifeMeterBattery::Load( const PlayerState *pPlayerState, PlayerStageStats *
|
|||||||
|
|
||||||
void LifeMeterBattery::OnSongEnded()
|
void LifeMeterBattery::OnSongEnded()
|
||||||
{
|
{
|
||||||
if( m_pPlayerStageStats->bFailed || m_pPlayerStageStats->bFailedEarlier )
|
if( m_pPlayerStageStats->bFailed || m_iLivesLeft == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if( m_iLivesLeft < GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives )
|
if( m_iLivesLeft < GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives )
|
||||||
@@ -89,7 +89,7 @@ void LifeMeterBattery::OnSongEnded()
|
|||||||
|
|
||||||
void LifeMeterBattery::ChangeLife( TapNoteScore score )
|
void LifeMeterBattery::ChangeLife( TapNoteScore score )
|
||||||
{
|
{
|
||||||
if( m_pPlayerStageStats->bFailedEarlier )
|
if( m_iLivesLeft == 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
switch( score )
|
switch( score )
|
||||||
@@ -116,8 +116,6 @@ void LifeMeterBattery::ChangeLife( TapNoteScore score )
|
|||||||
default:
|
default:
|
||||||
ASSERT(0);
|
ASSERT(0);
|
||||||
}
|
}
|
||||||
if( m_iLivesLeft == 0 )
|
|
||||||
m_pPlayerStageStats->bFailedEarlier = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
|
void LifeMeterBattery::ChangeLife( HoldNoteScore score, TapNoteScore tscore )
|
||||||
@@ -150,7 +148,7 @@ bool LifeMeterBattery::IsHot() const
|
|||||||
|
|
||||||
bool LifeMeterBattery::IsFailing() const
|
bool LifeMeterBattery::IsFailing() const
|
||||||
{
|
{
|
||||||
return m_pPlayerStageStats->bFailedEarlier;
|
return m_iLivesLeft == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
float LifeMeterBattery::GetLife() const
|
float LifeMeterBattery::GetLife() const
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ void LifeMeterTime::Load( const PlayerState *pPlayerState, PlayerStageStats *pPl
|
|||||||
|
|
||||||
void LifeMeterTime::OnLoadSong()
|
void LifeMeterTime::OnLoadSong()
|
||||||
{
|
{
|
||||||
if( m_pPlayerStageStats->bFailedEarlier )
|
if( GetLifeSeconds() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Course* pCourse = GAMESTATE->m_pCurCourse;
|
Course* pCourse = GAMESTATE->m_pCurCourse;
|
||||||
@@ -84,7 +84,7 @@ void LifeMeterTime::OnLoadSong()
|
|||||||
|
|
||||||
void LifeMeterTime::ChangeLife( TapNoteScore tns )
|
void LifeMeterTime::ChangeLife( TapNoteScore tns )
|
||||||
{
|
{
|
||||||
if( m_pPlayerStageStats->bFailedEarlier )
|
if( GetLifeSeconds() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float fMeterChange = 0;
|
float fMeterChange = 0;
|
||||||
@@ -101,14 +101,11 @@ void LifeMeterTime::ChangeLife( TapNoteScore tns )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_fLifeTotalLostSeconds -= fMeterChange;
|
m_fLifeTotalLostSeconds -= fMeterChange;
|
||||||
|
|
||||||
if( GetLifeSeconds() <= 0 )
|
|
||||||
m_pPlayerStageStats->bFailedEarlier = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifeMeterTime::ChangeLife( HoldNoteScore hns, TapNoteScore tns )
|
void LifeMeterTime::ChangeLife( HoldNoteScore hns, TapNoteScore tns )
|
||||||
{
|
{
|
||||||
if( m_pPlayerStageStats->bFailedEarlier )
|
if( GetLifeSeconds() <= 0 )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
float fMeterChange = 0;
|
float fMeterChange = 0;
|
||||||
@@ -120,9 +117,6 @@ void LifeMeterTime::ChangeLife( HoldNoteScore hns, TapNoteScore tns )
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_fLifeTotalLostSeconds -= fMeterChange;
|
m_fLifeTotalLostSeconds -= fMeterChange;
|
||||||
|
|
||||||
if( GetLifeSeconds() <= 0 )
|
|
||||||
m_pPlayerStageStats->bFailedEarlier = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LifeMeterTime::IsInDanger() const
|
bool LifeMeterTime::IsInDanger() const
|
||||||
@@ -137,7 +131,7 @@ bool LifeMeterTime::IsHot() const
|
|||||||
|
|
||||||
bool LifeMeterTime::IsFailing() const
|
bool LifeMeterTime::IsFailing() const
|
||||||
{
|
{
|
||||||
return m_pPlayerStageStats->bFailedEarlier;
|
return GetLifeSeconds() <= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LifeMeterTime::Update( float fDeltaTime )
|
void LifeMeterTime::Update( float fDeltaTime )
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ void PlayerStageStats::Init()
|
|||||||
vpPossibleSteps.clear();
|
vpPossibleSteps.clear();
|
||||||
fAliveSeconds = 0;
|
fAliveSeconds = 0;
|
||||||
bFailed = false;
|
bFailed = false;
|
||||||
bFailedEarlier = false;
|
|
||||||
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
|
iPossibleDancePoints = iCurPossibleDancePoints = iActualDancePoints = 0;
|
||||||
iPossibleGradePoints = 0;
|
iPossibleGradePoints = 0;
|
||||||
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
|
iCurCombo = iMaxCombo = iCurMissCombo = iScore = iBonus = iMaxScore = iCurMaxScore = 0;
|
||||||
@@ -58,7 +57,6 @@ void PlayerStageStats::AddStats( const PlayerStageStats& other )
|
|||||||
vpPossibleSteps.push_back( *s );
|
vpPossibleSteps.push_back( *s );
|
||||||
fAliveSeconds += other.fAliveSeconds;
|
fAliveSeconds += other.fAliveSeconds;
|
||||||
bFailed |= other.bFailed;
|
bFailed |= other.bFailed;
|
||||||
bFailedEarlier |= other.bFailedEarlier;
|
|
||||||
iPossibleDancePoints += other.iPossibleDancePoints;
|
iPossibleDancePoints += other.iPossibleDancePoints;
|
||||||
iActualDancePoints += other.iActualDancePoints;
|
iActualDancePoints += other.iActualDancePoints;
|
||||||
iCurPossibleDancePoints += other.iCurPossibleDancePoints;
|
iCurPossibleDancePoints += other.iCurPossibleDancePoints;
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ public:
|
|||||||
* this is only set if both players were failing at the same time. */
|
* this is only set if both players were failing at the same time. */
|
||||||
bool bFailed;
|
bool bFailed;
|
||||||
|
|
||||||
/* This indicates whether the player bottomed out his bar/ran out of lives at some
|
|
||||||
* point during the song. It's set in all fail modes. */
|
|
||||||
bool bFailedEarlier;
|
|
||||||
int iPossibleDancePoints;
|
int iPossibleDancePoints;
|
||||||
int iCurPossibleDancePoints;
|
int iCurPossibleDancePoints;
|
||||||
int iActualDancePoints;
|
int iActualDancePoints;
|
||||||
|
|||||||
Reference in New Issue
Block a user