Movement bug fix. Npc mistakenly move away from its new target.

This commit is contained in:
chaodhib authored and Aokromes committed 2016-05-12 08:40:58 +02:00
1 parent d1e3be8b00
commit a2337bff45
1 file changed
+3
@@ -48,6 +48,9 @@ void TargetedMovementGeneratorMedium<T, D>::_setTargetLocation(T* owner, bool up
{
if (!i_offset)
{
if (i_target->IsWithinDistInMap(owner, CONTACT_DISTANCE))
return;
// to nearest contact position
i_target->GetContactPoint(owner, x, y, z);
}