Core/Pets: Fix bugged reactstate behaviour after spline system implementation.

Signed-off-by: Machiavelli <[email protected]>
This commit is contained in:
MrSmite
2012-02-21 10:26:14 +01:00
committed by Machiavelli
parent 44195689b9
commit fb39566f1f
2 changed files with 22 additions and 17 deletions
@@ -38,15 +38,18 @@ void TargetedMovementGeneratorMedium<T,D>::_setTargetLocation(T &owner)
return;
float x, y, z;
if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset))
{
if (!owner.movespline->Finalized())
return;
owner.GetPosition(x, y, z);
}
else if (!i_offset)
//! Following block of code deleted by MrSmite in issue 4891
//! Code kept for learning and diagnostical purposes
//
// if (i_offset && i_target->IsWithinDistInMap(&owner,2*i_offset))
// {
// if (!owner.movespline->Finalized())
// return;
//
// owner.GetPosition(x, y, z);
// }
// else
if (!i_offset)
{
if (i_target->IsWithinMeleeRange(&owner))
return;