mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-14 15:41:30 +00:00
BestZ will now adjust for model size when used to adjust movement z
This commit is contained in:
parent
579294fbf0
commit
7f7f99cbe3
@ -212,10 +212,6 @@ RULE_REAL ( Map, FixPathingZMaxDeltaMoving, 20 ) //at runtime while pathing: max
|
||||
RULE_REAL ( Map, FixPathingZMaxDeltaWaypoint, 20 ) //at runtime at each waypoint: max change in Z to allow the BestZ code to apply.
|
||||
RULE_REAL ( Map, FixPathingZMaxDeltaSendTo, 20 ) //at runtime in SendTo: max change in Z to allow the BestZ code to apply.
|
||||
RULE_REAL ( Map, FixPathingZMaxDeltaLoading, 45 ) //while loading each waypoint: max change in Z to allow the BestZ code to apply.
|
||||
RULE_BOOL ( Map, UseClosestZ, false) // Move mobs to the nearest Z above or below, rather than just the nearest below.
|
||||
// Only set UseClosestZ true if all your .map files generated from EQGs were created
|
||||
// with azone2.
|
||||
//
|
||||
RULE_INT ( Map, FindBestZHeightAdjust, 1) // Adds this to the current Z before seeking the best Z position
|
||||
RULE_CATEGORY_END()
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user