Core/Movement: first part of porting the new creature hover handling
This commit is contained in:
1 parent
50a91bd590
commit
eb15db4522
25 files changed
+144
-167
No files matched your search
@@ -158,7 +158,7 @@ bool ChaseMovementGenerator::Update(Unit* owner, uint32 diff)
|
||||
else
|
||||
{
|
||||
// otherwise, we fall back to nearpoint finding
|
||||
target->GetNearPoint(owner, x, y, z, target->GetCombatReach(), (moveToward ? maxTarget : minTarget) - hitboxSum, angle ? target->NormalizeOrientation(target->GetOrientation() - angle->RelativeAngle) : target->GetAngle(owner));
|
||||
target->GetNearPoint(owner, x, y, z, (moveToward ? maxTarget : minTarget) - hitboxSum, angle ? target->NormalizeOrientation(target->GetOrientation() - angle->RelativeAngle) : target->GetAngle(owner));
|
||||
shortenPath = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ bool FollowMovementGenerator::Update(Unit* owner, uint32 diff)
|
||||
tAngle = _angle.LowerBound();
|
||||
}
|
||||
|
||||
target->GetNearPoint(owner, x, y, z, target->GetCombatReach(), _range, target->NormalizeOrientation(target->GetOrientation() + tAngle));
|
||||
target->GetNearPoint(owner, x, y, z, _range, target->NormalizeOrientation(target->GetOrientation() + tAngle));
|
||||
|
||||
if (owner->IsHovering())
|
||||
owner->UpdateAllowedPositionZ(x, y, z);
|
||||
|
||||
@@ -52,6 +52,7 @@ void HomeMovementGenerator<Creature>::SetTargetLocation(Creature* owner)
|
||||
owner->GetHomePosition(x, y, z, o);
|
||||
init.SetFacing(o);
|
||||
}
|
||||
owner->UpdateAllowedPositionZ(x, y, z);
|
||||
init.MoveTo(x, y, z);
|
||||
init.SetWalk(false);
|
||||
init.Launch();
|
||||
|
||||
Reference in new issue
Block a user