mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 01:11:29 +00:00
Use the melee push pos update timer for rate limiting the pushes
Also lowered the timer since it's limiting actual movement now
This commit is contained in:
parent
8e4aff391e
commit
7edc891605
@ -3620,14 +3620,12 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
||||
// update NPC stuff
|
||||
auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x),
|
||||
m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z);
|
||||
if (zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
|
||||
if (position_update_melee_push_timer.Check() && zone->zonemap && zone->zonemap->CheckLoS(glm::vec3(m_Position), new_pos)) { // If we have LoS on the new loc it should be reachable.
|
||||
if (IsNPC()) {
|
||||
// Is this adequate?
|
||||
|
||||
Teleport(new_pos);
|
||||
if (position_update_melee_push_timer.Check()) {
|
||||
SendPositionUpdate();
|
||||
}
|
||||
SendPositionUpdate();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@ -115,7 +115,7 @@ Mob::Mob(const char* in_name,
|
||||
fix_z_timer(300),
|
||||
fix_z_timer_engaged(100),
|
||||
attack_anim_timer(1000),
|
||||
position_update_melee_push_timer(1000),
|
||||
position_update_melee_push_timer(500),
|
||||
mHateListCleanup(6000)
|
||||
{
|
||||
targeted = 0;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user