mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Movement: Fix RandomMovementGenerator for swimming creatures
Fix RandomMovementGenerator for swimming creatures not moving at all due to PATHFIND_FARFROMPOLY being handled as wrong path. Fixes #25236
This commit is contained in:
@@ -141,9 +141,10 @@ void RandomMovementGenerator<Creature>::SetRandomLocation(Creature* owner)
|
||||
}
|
||||
|
||||
bool result = _path->CalculatePath(position.GetPositionX(), position.GetPositionY(), position.GetPositionZ());
|
||||
// PATHFIND_FARFROMPOLY shouldn't be checked as creatures in water are most likely far from poly
|
||||
if (!result || (_path->GetPathType() & PATHFIND_NOPATH)
|
||||
|| (_path->GetPathType() & PATHFIND_SHORTCUT)
|
||||
|| (_path->GetPathType() & PATHFIND_FARFROMPOLY))
|
||||
/*|| (_path->GetPathType() & PATHFIND_FARFROMPOLY)*/)
|
||||
{
|
||||
_timer.Reset(100);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user