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.
This commit is contained in:
1 parent
4ea65b38bd
commit
5989ad860c
1 file changed
+2
-1
@@ -123,9 +123,10 @@ void RandomMovementGenerator<Creature>::SetRandomLocation(Creature* owner)
|
||||
|
||||
_path->SetPathLengthLimit(30.0f);
|
||||
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(500);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user