mirror of
https://github.com/mangosfour/server.git
synced 2025-12-20 16:37:04 +00:00
[11820] implement OrientationFixed splineflag, correct OrientationInversed flag meaning. Add possibility to play landing, liftoff animation at arrive. Thanks to TOM_RUS for AnimType research
This commit is contained in:
parent
d62061f423
commit
59f8716542
10 changed files with 64 additions and 34 deletions
|
|
@ -54,7 +54,7 @@ namespace Movement
|
|||
{
|
||||
MoveSpline& move_spline = *unit.movespline;
|
||||
|
||||
Vector3 real_position(unit.GetPositionX(),unit.GetPositionY(),unit.GetPositionZ());
|
||||
Location real_position(unit.GetPositionX(),unit.GetPositionY(),unit.GetPositionZ(),unit.GetOrientation());
|
||||
// there is a big chane that current position is unknown if current state is not finalized, need compute it
|
||||
// this also allows calculate spline position and update map position in much greater intervals
|
||||
if (!move_spline.Finalized())
|
||||
|
|
@ -68,6 +68,8 @@ namespace Movement
|
|||
|
||||
// corrent first vertex
|
||||
args.path[0] = real_position;
|
||||
args.initialOrientation = real_position.orientation;
|
||||
|
||||
uint32 moveFlags = unit.m_movementInfo.GetMovementFlags();
|
||||
if (args.flags.walkmode)
|
||||
moveFlags |= MOVEFLAG_WALK_MODE;
|
||||
|
|
@ -103,4 +105,10 @@ namespace Movement
|
|||
args.flags.EnableFacingTarget();
|
||||
args.facing.target = target->GetObjectGuid().GetRawValue();
|
||||
}
|
||||
|
||||
void MoveSplineInit::SetFacing(float angle)
|
||||
{
|
||||
args.facing.angle = G3D::wrap(angle, 0.f, (float)G3D::twoPi());
|
||||
args.flags.EnableFacingAngle();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue