fix demonstration doing badly when modifiers are active
This commit is contained in:
@@ -29,7 +29,7 @@ struct TapScoreDistribution
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
TapScoreDistribution g_Distributions[NUM_SKILL_LEVELS];
|
static TapScoreDistribution g_Distributions[NUM_SKILL_LEVELS];
|
||||||
|
|
||||||
|
|
||||||
void PlayerAI::InitFromDisk()
|
void PlayerAI::InitFromDisk()
|
||||||
@@ -65,6 +65,12 @@ void PlayerAI::InitFromDisk()
|
|||||||
TapNoteScore PlayerAI::GetTapNoteScore( const PlayerState* pPlayerState )
|
TapNoteScore PlayerAI::GetTapNoteScore( const PlayerState* pPlayerState )
|
||||||
{
|
{
|
||||||
int iCpuSkill = pPlayerState->m_iCpuSkill;
|
int iCpuSkill = pPlayerState->m_iCpuSkill;
|
||||||
|
|
||||||
|
/* If we're in battle mode, reduce the skill based on the number of modifier attacks
|
||||||
|
* against us. If we're in demonstration or jukebox mode with modifiers attached,
|
||||||
|
* don't make demonstration miss a lot. */
|
||||||
|
if( !GAMESTATE->m_bDemonstrationOrJukebox )
|
||||||
|
{
|
||||||
int iSumOfAttackLevels =
|
int iSumOfAttackLevels =
|
||||||
pPlayerState->m_fSecondsUntilAttacksPhasedOut > 0 ?
|
pPlayerState->m_fSecondsUntilAttacksPhasedOut > 0 ?
|
||||||
pPlayerState->m_iLastPositiveSumOfAttackLevels :
|
pPlayerState->m_iLastPositiveSumOfAttackLevels :
|
||||||
@@ -75,6 +81,7 @@ TapNoteScore PlayerAI::GetTapNoteScore( const PlayerState* pPlayerState )
|
|||||||
|
|
||||||
iCpuSkill -= iSumOfAttackLevels*3;
|
iCpuSkill -= iSumOfAttackLevels*3;
|
||||||
CLAMP( iCpuSkill, 0, NUM_SKILL_LEVELS-1 );
|
CLAMP( iCpuSkill, 0, NUM_SKILL_LEVELS-1 );
|
||||||
|
}
|
||||||
|
|
||||||
TapScoreDistribution& distribution = g_Distributions[iCpuSkill];
|
TapScoreDistribution& distribution = g_Distributions[iCpuSkill];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user