mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 10:31:29 +00:00
Add 2013 NPC vs NPC push change
They remove NPC vs NPC melee push in 2013
This commit is contained in:
parent
7edc891605
commit
d71e79b306
@ -3615,21 +3615,30 @@ void Mob::CommonDamage(Mob* attacker, int &damage, const uint16 spell_id, const
|
|||||||
if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() &&
|
if (RuleB(Combat, MeleePush) && damage > 0 && !IsRooted() &&
|
||||||
(IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) {
|
(IsClient() || zone->random.Roll(RuleI(Combat, MeleePushChance)))) {
|
||||||
a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used);
|
a->force = EQEmu::skills::GetSkillMeleePushForce(skill_used);
|
||||||
if (IsNPC())
|
if (IsNPC()) {
|
||||||
a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC
|
if (attacker->IsNPC())
|
||||||
// update NPC stuff
|
a->force = 0.0f; // 2013 change that disabled NPC vs NPC push
|
||||||
auto new_pos = glm::vec3(m_Position.x + (a->force * std::cos(a->hit_heading) + m_Delta.x),
|
else
|
||||||
m_Position.y + (a->force * std::sin(a->hit_heading) + m_Delta.y), m_Position.z);
|
a->force *= 0.10f; // force against NPCs is divided by 10 I guess? ex bash is 0.3, parsed 0.03 against an NPC
|
||||||
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);
|
|
||||||
SendPositionUpdate();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
// update NPC stuff
|
||||||
a->force = 0.0f; // we couldn't move there, so lets not
|
if (a->force != 0.0f) {
|
||||||
|
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 (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);
|
||||||
|
SendPositionUpdate();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
a->force = 0.0f; // we couldn't move there, so lets not
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user