Core/Creatures: update a creature's home position on engage when it's using a cyclic spline

This commit is contained in:
Ovahlord
2021-03-14 09:23:29 +01:00
parent a80faa391b
commit 1675506c97

View File

@@ -3321,7 +3321,7 @@ void Creature::AtEngage(Unit* target)
RefreshSwimmingFlag();
MovementGeneratorType const movetype = GetMotionMaster()->GetCurrentMovementGeneratorType();
if (movetype == WAYPOINT_MOTION_TYPE || movetype == POINT_MOTION_TYPE || (IsAIEnabled && AI()->IsEscorted()))
if (movetype == WAYPOINT_MOTION_TYPE || movetype == CYCLIC_SPLINE_MOTION_TYPE || movetype == POINT_MOTION_TYPE || (IsAIEnabled && AI()->IsEscorted()))
SetHomePosition(GetPosition());
if (CreatureAI* ai = AI())