Core/Movement

* Updated movement flags
* Cleaned up MovementStatusElements enum
* Updated and enabled MSG_MOVE_START_FORWARD
This commit is contained in:
Shauren committed 2012-07-14 23:39:12 +02:00
1 parent 2d144e4925
commit 27ea130b55
15 files changed
+1386 -1272

No files matched your search

+8 -3
View File
@@ -396,7 +396,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
m_movesplineTimer.Reset(POSITION_UPDATE_DELAY);
Movement::Location loc = movespline->ComputePosition();
if (HasUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT))
if (GetTransGUID())
{
Position& pos = m_movementInfo.t_pos;
pos.m_positionX = loc.x;
@@ -420,7 +420,7 @@ void Unit::UpdateSplineMovement(uint32 t_diff)
void Unit::DisableSpline()
{
m_movementInfo.RemoveMovementFlag(MovementFlags(MOVEMENTFLAG_SPLINE_ENABLED|MOVEMENTFLAG_FORWARD));
m_movementInfo.RemoveMovementFlag(MOVEMENTFLAG_FORWARD);
movespline->_Interrupt();
}
@@ -17644,7 +17644,7 @@ void Unit::BuildMovementPacket(ByteBuffer *data) const
*data << GetPositionZMinusOffset();
*data << GetOrientation();
bool onTransport = GetUnitMovementFlags() & MOVEMENTFLAG_ONTRANSPORT;
bool onTransport = m_movementInfo.t_guid != 0;
bool hasInterpolatedMovement = m_movementInfo.flags2 & MOVEMENTFLAG2_INTERPOLATED_MOVEMENT;
bool time3 = false;
bool swimming = ((GetUnitMovementFlags() & (MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_FLYING))
@@ -18180,3 +18180,8 @@ void Unit::SendMovementCanFlyChange()
BuildMovementPacket(&data);
SendMessageToSet(&data, false);
}
bool Unit::IsSplineEnabled() const
{
return !movespline->Finalized();
}