mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 04:02:30 +01:00
Animation speed now properly scales
That is, the increase in attack speed is the same as the increase in animation speed. Previously, this was only the case for absolute increases. Now percentage increases do so, as well.
This commit is contained in:
parent
3165e41014
commit
a829fe580a
@ -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{
|
||||
|
Loading…
x
Reference in New Issue
Block a user