mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-15 20:52:22 -04:00
Core/MMaps: Add several safety checks to confirm a valid path generation.
- Address some issues in TargetMovementGenerator. Thanks Chevron
This commit is contained in:
@@ -2780,7 +2780,7 @@ void WorldObject::MovePosition(Position &pos, float dist, float angle)
|
||||
desty = pos.m_positionY + dist * sin(angle);
|
||||
|
||||
// Prevent invalid coordinates here, position is unchanged
|
||||
if (!Trinity::IsValidMapCoord(destx, desty))
|
||||
if (!Trinity::IsValidMapCoord(destx, desty, pos.m_positionZ))
|
||||
{
|
||||
sLog->outFatal(LOG_FILTER_GENERAL, "WorldObject::MovePosition invalid coordinates X: %f and Y: %f were passed!", destx, desty);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user