mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-06-20 15:39:25 +02:00
fix(Core/RPG): Reject mmap paths whose endpoint Z misses dest
This commit is contained in:
parent
ba1b429bc5
commit
c5435f15c1
@ -220,6 +220,19 @@ bool NewRpgBaseAction::MoveFarTo(WorldPosition dest)
|
|||||||
stepDest.GetPositionY(), stepDest.GetPositionZ());
|
stepDest.GetPositionY(), stepDest.GetPositionZ());
|
||||||
if (endDistToDest + 5.0f < disToDest)
|
if (endDistToDest + 5.0f < disToDest)
|
||||||
{
|
{
|
||||||
|
// Z gap check: if the probe's last waypoint is well below
|
||||||
|
// the requested destination Z, the chain walked the ground
|
||||||
|
// polygon graph toward an elevated target it can't reach
|
||||||
|
// (quest giver on top of Aldrassil etc.). Refuse to dispatch
|
||||||
|
// — bot waits instead of tunneling into the visual model.
|
||||||
|
if (std::fabs(stepDest.GetPositionZ() - dest.GetPositionZ()) > 5.0f)
|
||||||
|
{
|
||||||
|
EmitDebugMove("MoveFar", "z-mismatch",
|
||||||
|
dest.GetPositionX(), dest.GetPositionY(),
|
||||||
|
dest.GetPositionZ());
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Movement::PointsArray points;
|
Movement::PointsArray points;
|
||||||
points.reserve(probe.size());
|
points.reserve(probe.size());
|
||||||
for (auto const& wp : probe)
|
for (auto const& wp : probe)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user