Core/Creature: dropped advance movement until it is moved to ChaseMovementGenerator

This commit is contained in:
Ovalord committed 2018-01-23 17:52:04 +01:00
1 parent f1f06fd8ac
commit 716bd18135
6 files changed
+2 -52

No files matched your search

-22
View File
@@ -485,28 +485,6 @@ void Unit::MonsterMoveWithSpeed(float x, float y, float z, float speed, bool gen
init.Launch();
}
void Unit::MoveAdvanceTo(Unit* target)
{
if (!target) // Just in case
return;
// Do not reposition ourself when we are not allowed to move
if ((IsMovementPreventedByCasting() || isMoving() || !CanFreeMove()) &&
GetMotionMaster()->GetCurrentMovementGeneratorType() != CHASE_MOTION_TYPE)
return;
float x, y, z;
GetNearPoint(target, x, y, z, 0.0f, 0.0f, target->GetAngle(this));
Movement::MoveSplineInit init(this);
init.MoveTo(x, y, z, true, false);
// Creatures except humanoids move backwards instead of turning arround
if (ToCreature() && ToCreature()->GetCreatureTemplate()->type != CREATURE_TYPE_HUMANOID)
init.SetOrientationFixed(true);
init.Launch();
}
void Unit::UpdateSplineMovement(uint32 t_diff)
{
if (movespline->Finalized())