mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 16:58:02 +00:00
Merge branch 'master' into auras
This commit is contained in:
+3
-1
@@ -1001,7 +1001,7 @@ void Mob::AI_Process() {
|
||||
if (this->GetTarget()) {
|
||||
/* If we are engaged, moving and following client, let's look for best Z more often */
|
||||
float target_distance = DistanceNoZ(this->GetPosition(), this->GetTarget()->GetPosition());
|
||||
if (target_distance >= 50) {
|
||||
if (target_distance >= 25) {
|
||||
this->FixZ();
|
||||
}
|
||||
else if (!this->CheckLosFN(this->GetTarget())) {
|
||||
@@ -1573,6 +1573,8 @@ void NPC::AI_DoMovement() {
|
||||
SetHeading(m_CurrentWayPoint.w);
|
||||
}
|
||||
|
||||
this->FixZ();
|
||||
|
||||
SendPosition();
|
||||
|
||||
//kick off event_waypoint arrive
|
||||
|
||||
+2
-1
@@ -849,6 +849,7 @@ void Mob::FixZ() {
|
||||
{
|
||||
/* Any more than 5 in the offset makes NPC's hop/snap to ceiling in small corridors */
|
||||
float new_z = this->FindGroundZ(m_Position.x, m_Position.y, 5);
|
||||
new_z += (this->GetSize() / 1.55);
|
||||
|
||||
auto duration = timer.elapsed();
|
||||
|
||||
@@ -864,7 +865,7 @@ void Mob::FixZ() {
|
||||
duration
|
||||
);
|
||||
|
||||
if ((new_z > -2000) && std::abs(m_Position.z - new_z) < 35) {
|
||||
if ((new_z > -2000) && new_z != -999999) {
|
||||
if (RuleB(Map, MobZVisualDebug))
|
||||
this->SendAppearanceEffect(78, 0, 0, 0, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user