Lower animation throttle frequency

This commit is contained in:
Akkadius 2020-06-28 22:56:33 -05:00
parent 30067f9b6d
commit 05113aab7d

View File

@ -115,7 +115,7 @@ Mob::Mob(
tmHidden(-1),
mitigation_ac(0),
m_specialattacks(eSpecialAttacks::None),
attack_anim_timer(1000),
attack_anim_timer(500),
position_update_melee_push_timer(500),
hate_list_cleanup_timer(6000),
mob_scan_close(6000),
@ -1645,15 +1645,17 @@ void Mob::ShowStats(Client* client)
}
}
void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter) {
if (!attack_anim_timer.Check())
void Mob::DoAnim(const int animnum, int type, bool ackreq, eqFilterType filter)
{
if (!attack_anim_timer.Check()) {
return;
}
auto outapp = new EQApplicationPacket(OP_Animation, sizeof(Animation_Struct));
Animation_Struct* anim = (Animation_Struct*)outapp->pBuffer;
auto *anim = (Animation_Struct *) outapp->pBuffer;
anim->spawnid = GetID();
if(type == 0){
if (type == 0) {
anim->action = animnum;
anim->speed = 10;
}