add NumControllerSteps
This commit is contained in:
+28
-26
@@ -1622,36 +1622,38 @@ void Player::StepStrumHopo( int col, int row, const RageTimer &tm, bool bHeld, b
|
||||
{
|
||||
// TODO: remove use of PlayerNumber
|
||||
PlayerNumber pn = m_pPlayerState->m_PlayerNumber;
|
||||
int iWeightPounds = 120;
|
||||
Profile *pProfile = PROFILEMAN->GetProfile( pn );
|
||||
if( pProfile )
|
||||
iWeightPounds = pProfile->GetCalculatedWeightPounds();
|
||||
|
||||
int iNumTracksHeld = 0;
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
{
|
||||
int iNumTracksHeld = 0;
|
||||
for( int t=0; t<m_NoteData.GetNumTracks(); t++ )
|
||||
{
|
||||
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, pn );
|
||||
const float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
||||
if( fSecsHeld > 0 && fSecsHeld < m_fTimingWindowJump )
|
||||
iNumTracksHeld++;
|
||||
}
|
||||
|
||||
float fCals = 0;
|
||||
switch( iNumTracksHeld )
|
||||
{
|
||||
case 0:
|
||||
// autoplay is on, or this is a computer player
|
||||
iNumTracksHeld = 1;
|
||||
// fall through
|
||||
default:
|
||||
{
|
||||
float fCalsFor100Lbs = SCALE( iNumTracksHeld, 1, 2, 0.023f, 0.077f );
|
||||
float fCalsFor200Lbs = SCALE( iNumTracksHeld, 1, 2, 0.041f, 0.133f );
|
||||
fCals = SCALE( pProfile->GetCalculatedWeightPounds(), 100.f, 200.f, fCalsFor100Lbs, fCalsFor200Lbs );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
m_pPlayerStageStats->m_fCaloriesBurned += fCals;
|
||||
GameInput GameI = GAMESTATE->GetCurrentStyle()->StyleInputToGameInput( t, pn );
|
||||
const float fSecsHeld = INPUTMAPPER->GetSecsHeld( GameI );
|
||||
if( fSecsHeld > 0 && fSecsHeld < m_fTimingWindowJump )
|
||||
iNumTracksHeld++;
|
||||
}
|
||||
|
||||
float fCals = 0;
|
||||
switch( iNumTracksHeld )
|
||||
{
|
||||
case 0:
|
||||
// autoplay is on, or this is a computer player
|
||||
iNumTracksHeld = 1;
|
||||
// fall through
|
||||
default:
|
||||
{
|
||||
float fCalsFor100Lbs = SCALE( iNumTracksHeld, 1, 2, 0.023f, 0.077f );
|
||||
float fCalsFor200Lbs = SCALE( iNumTracksHeld, 1, 2, 0.041f, 0.133f );
|
||||
fCals = SCALE( pProfile->GetCalculatedWeightPounds(), 100.f, 200.f, fCalsFor100Lbs, fCalsFor200Lbs );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
m_pPlayerStageStats->m_fCaloriesBurned += fCals;
|
||||
m_pPlayerStageStats->m_iNumControllerSteps ++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user