Skip to content
This repository has been archived by the owner on Mar 12, 2024. It is now read-only.

Commit

Permalink
[Pathing] More z-clip improvements, Wurm and Spectral Iksar race adju…
Browse files Browse the repository at this point in the history
…stments (EQEmu#2988)
  • Loading branch information
Akkadius authored and catapultam-habeo committed Mar 27, 2023
1 parent 867a18c commit 3f6ec27
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 9 additions & 3 deletions zone/mob_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1073,9 +1073,15 @@ void Mob::AI_Process() {
if (engaged) {
if (IsNPC() && m_z_clip_check_timer.Check()) {
auto t = GetTarget();
if (t && DistanceNoZ(GetPosition(), t->GetPosition()) < 75 && std::abs(GetPosition().z - t->GetPosition().z) > 15 && !CheckLosFN(t)) {
GMMove(t->GetPosition().x, t->GetPosition().y, t->GetPosition().z, t->GetPosition().w);
FaceTarget(t);
if (t) {
float self_z = GetZ() - GetZOffset();
float target_z = t->GetPosition().z - t->GetZOffset();
if (DistanceNoZ(GetPosition(), t->GetPosition()) < 75 &&
std::abs(self_z - target_z) >= 25 && !CheckLosFN(t)) {
float new_z = FindDestGroundZ(t->GetPosition());
GMMove(t->GetPosition().x, t->GetPosition().y, new_z + GetZOffset(), t->GetPosition().w, false);
FaceTarget(t);
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions zone/npc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ NPC::NPC(const NPCType *npc_type_data, Spawn2 *in_respawn, const glm::vec4 &posi
if (race == RACE_LAVA_DRAGON_49) {
size = 5;
}
if (race == RACE_WURM_158) {
size = 15;
}

taunting = false;
proximity = nullptr;
Expand Down
1 change: 1 addition & 0 deletions zone/waypoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,7 @@ float Mob::GetZOffset() const {
case RACE_AMYGDALAN_663:
offset = 5.0f;
break;
case RACE_SPECTRAL_IKSAR_147:
case RACE_SANDMAN_664:
offset = 4.0f;
break;
Expand Down

0 comments on commit 3f6ec27

Please sign in to comment.