diff --git a/source/glest_game/types/skill_type.cpp b/source/glest_game/types/skill_type.cpp index 9aabec79..b6aa6318 100644 --- a/source/glest_game/types/skill_type.cpp +++ b/source/glest_game/types/skill_type.cpp @@ -941,8 +941,16 @@ int AttackSkillType::getTotalSpeed(const TotalUpgrade *totalUpgrade) const{ return result; } +// Get the amount to boost the attack animation speed by (based on attack-speed upgrades) int AttackSkillType::getAnimSpeedBoost(const TotalUpgrade *totalUpgrade) const{ - return totalUpgrade->getAttackSpeed(this); + // Same calculation as in TotalUpgrade::sum, but bypassing the use of the value + // list (which is for the attack speed, not animation speed) + if(totalUpgrade->getAttackRangeIsMultiplier()) { + return animSpeed * (totalUpgrade->getAttackSpeed(NULL) / (double)100); + } + else { + return totalUpgrade->getAttackSpeed(NULL); + } } string AttackSkillType::toString(bool translatedValue) const{