mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
BestZ will now adjust for model size when used to adjust movement z
This commit is contained in:
@@ -568,6 +568,8 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
Map::Vertex dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
float sz = GetSize();
|
||||
newz += sz >= 0.0f ? sz / 2.0f : 0.0f;
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -697,6 +699,8 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
Map::Vertex dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
float sz = GetSize();
|
||||
newz += sz >= 0.0f ? sz / 2.0f : 0.0f;
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
@@ -822,6 +826,8 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
Map::Vertex dest(x_pos, y_pos, z_pos);
|
||||
|
||||
float newz = zone->zonemap->FindBestZ(dest, nullptr);
|
||||
float sz = GetSize();
|
||||
newz += sz >= 0.0f ? sz / 2.0f : 0.0f;
|
||||
|
||||
mlog(AI__WAYPOINTS, "BestZ returned %4.3f at %4.3f, %4.3f, %4.3f", newz,x_pos,y_pos,z_pos);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user