count calories while stepping, not at the end

This commit is contained in:
Chris Danford
2005-02-15 09:24:48 +00:00
parent 2b974e654d
commit bb099ee7e0
8 changed files with 54 additions and 28 deletions
+3 -2
View File
@@ -123,7 +123,7 @@ bool GameCommand::DescribesCurrentMode( PlayerNumber pn ) const
return false;
if( m_SortOrder != SORT_INVALID && GAMESTATE->m_PreferredSortOrder != m_SortOrder )
return false;
if( m_iWeightPounds != -1 && GAMESTATE->m_pPlayerState[pn]->m_iWeightPounds != m_iWeightPounds )
if( m_iWeightPounds != -1 && PROFILEMAN->IsUsingProfile(pn) && PROFILEMAN->GetProfile(pn)->m_iWeightPounds != m_iWeightPounds )
return false;
if( m_iStopCourseAtSeconds != -1 && GAMESTATE->m_iStopCourseAtSeconds != m_iStopCourseAtSeconds )
return false;
@@ -642,7 +642,8 @@ void GameCommand::Apply( const vector<PlayerNumber> &vpns ) const
SOUND->PlayOnce( THEME->GetPathToS( m_sSoundPath ) );
if( m_iWeightPounds != -1 )
FOREACH_CONST( PlayerNumber, vpns, pn )
GAMESTATE->m_pPlayerState[*pn]->m_iWeightPounds = m_iWeightPounds;
if( PROFILEMAN->IsUsingProfile(*pn) )
PROFILEMAN->GetProfile(*pn)->m_iWeightPounds = m_iWeightPounds;
if( m_iStopCourseAtSeconds != -1 )
GAMESTATE->m_iStopCourseAtSeconds = m_iStopCourseAtSeconds;