save Preferred, Stage, Song, and Current modifiers separately. This eliminates the fragile mods store/restore.

This commit is contained in:
Chris Danford
2006-08-05 02:38:05 +00:00
parent 5440a7b613
commit 7ac45c24e4
47 changed files with 389 additions and 363 deletions
+5 -5
View File
@@ -16,7 +16,7 @@ const float BATTERY_BLINK_TIME = 1.2f;
LifeMeterBattery::LifeMeterBattery()
{
m_iLivesLeft = GAMESTATE->m_SongOptions.m_iBatteryLives;
m_iLivesLeft = GAMESTATE->m_SongOptions.GetStage().m_iBatteryLives;
m_iTrailingLivesLeft = m_iLivesLeft;
m_fBatteryBlinkTime = 0;
@@ -67,12 +67,12 @@ void LifeMeterBattery::OnSongEnded()
if( m_pPlayerStageStats->bFailedEarlier )
return;
if( m_iLivesLeft < GAMESTATE->m_SongOptions.m_iBatteryLives )
if( m_iLivesLeft < GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives )
{
m_iTrailingLivesLeft = m_iLivesLeft;
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
m_iLivesLeft += ( GAMESTATE->m_pCurSteps[pn]->GetMeter()>=8 ? 2 : 1 );
m_iLivesLeft = min( m_iLivesLeft, GAMESTATE->m_SongOptions.m_iBatteryLives );
m_iLivesLeft = min( m_iLivesLeft, GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives );
m_soundGainLife.Play();
}
@@ -153,10 +153,10 @@ bool LifeMeterBattery::IsFailing() const
float LifeMeterBattery::GetLife() const
{
if( !GAMESTATE->m_SongOptions.m_iBatteryLives )
if( !GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives )
return 1;
return float(m_iLivesLeft) / GAMESTATE->m_SongOptions.m_iBatteryLives;
return float(m_iLivesLeft) / GAMESTATE->m_SongOptions.GetSong().m_iBatteryLives;
}
void LifeMeterBattery::ForceFail()