mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
feat(Core/CreatureAI): improve npc position during the combat (#3369)
+ tangent equation to find correct angle and distance when moving + implemented proper backward * Improved performance + random angle margin * chore: add tollerance calculation in instance * improved LOS checks with movements * implemented collisions using raycast (imported by TC) + improved collision detection for CanReachPositionAndGetCoords + improved collision check + set correct flags for the backward movement + first implementation of slope angle (to improve) Co-authored-by: Yehonal <yehonal.azeroth@gmail.com>
This commit is contained in:
@@ -79,7 +79,16 @@ namespace Movement
|
||||
move_spline.onTransport = transport;
|
||||
|
||||
uint32 moveFlags = unit->m_movementInfo.GetMovementFlags();
|
||||
moveFlags |= (MOVEMENTFLAG_SPLINE_ENABLED | MOVEMENTFLAG_FORWARD);
|
||||
moveFlags |= MOVEMENTFLAG_SPLINE_ENABLED;
|
||||
|
||||
if (!args.flags.orientationInversed)
|
||||
{
|
||||
moveFlags = (moveFlags & ~(MOVEMENTFLAG_BACKWARD)) | MOVEMENTFLAG_FORWARD;
|
||||
}
|
||||
else
|
||||
{
|
||||
moveFlags = (moveFlags & ~(MOVEMENTFLAG_FORWARD)) | MOVEMENTFLAG_BACKWARD;
|
||||
}
|
||||
|
||||
if (moveFlags & MOVEMENTFLAG_ROOT)
|
||||
moveFlags &= ~MOVEMENTFLAG_MASK_MOVING;
|
||||
|
||||
Reference in New Issue
Block a user