mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-13 06:21:28 +00:00
[Pathing] More z-clip improvements, Wurm and Spectral Iksar race adjustments (#2988)
This commit is contained in:
parent
0cbfad975d
commit
e103422ca5
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user