[Core] Fix NPC's running to the first waypoint
This commit is contained in:
parent
b9d4767567
commit
5a86a332eb
@ -262,11 +262,11 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint8 updateFlags) const
|
||||
moveFlags |= MOVEFLAG_ONTRANSPORT;
|
||||
}
|
||||
|
||||
//float x, y, z;
|
||||
//if (m_objectTypeId == TYPEID_UNIT && ((Unit*)this)->GetMotionMaster()->GetDestination(x, y, z))
|
||||
//{
|
||||
// moveFlags |= MOVEFLAG_WALK_MODE | MOVEFLAG_FORWARD | MOVEFLAG_SPLINE_ENABLED;
|
||||
//}
|
||||
float x; // not used anywhere
|
||||
if (m_objectTypeId == TYPEID_UNIT && ((Unit*)this)->movespline && ((Unit*)this)->GetMotionMaster()->GetDestination(x, x, x))
|
||||
{
|
||||
moveFlags |= MOVEFLAG_WALK_MODE | MOVEFLAG_FORWARD | MOVEFLAG_SPLINE_ENABLED;
|
||||
}
|
||||
|
||||
*data << uint32(moveFlags); // movement flags
|
||||
*data << uint32(WorldTimer::getMSTime()); // time (in milliseconds)
|
||||
@ -327,7 +327,7 @@ void Object::BuildMovementUpdate(ByteBuffer* data, uint8 updateFlags) const
|
||||
|
||||
if (m_objectTypeId == TYPEID_UNIT)
|
||||
{
|
||||
if (moveFlags & MOVEFLAG_SPLINE_ENABLED) // 0x00400000
|
||||
if (moveFlags & MOVEFLAG_SPLINE_ENABLED && ((Unit*)this)->movespline) // 0x00400000
|
||||
{
|
||||
Movement::PacketBuilder::WriteCreate((*((Unit*)this)->movespline), *data);
|
||||
}
|
||||
|
@ -593,13 +593,13 @@ enum MovementFlags
|
||||
MOVEFLAG_FALLING = 0x00002000,
|
||||
MOVEFLAG_FALLINGFAR = 0x00004000,
|
||||
MOVEFLAG_SWIMMING = 0x00200000, // appears with fly flag also
|
||||
MOVEFLAG_ASCENDING = 0x00400000, // [-ZERO] is it really need and correct value
|
||||
MOVEFLAG_SPLINE_ENABLED = 0x00400000,
|
||||
MOVEFLAG_CAN_FLY = 0x00800000, // [-ZERO] is it really need and correct value
|
||||
MOVEFLAG_FLYING = 0x01000000, // [-ZERO] is it really need and correct value
|
||||
|
||||
MOVEFLAG_ONTRANSPORT = 0x02000000, // Used for flying on some creatures
|
||||
MOVEFLAG_SPLINE_ELEVATION = 0x04000000, // used for flight paths
|
||||
MOVEFLAG_SPLINE_ENABLED = 0x08000000, // used for flight paths
|
||||
MOVEFLAG_SPLINE_ELEVATION = 0x04000000, // [-ZERO] checkme! used for flight paths
|
||||
//MOVEFLAG_SPLINE_ENABLED = 0x08000000, // [-ZERO] wrong!
|
||||
MOVEFLAG_WATERWALKING = 0x10000000, // prevent unit from falling through water
|
||||
MOVEFLAG_SAFE_FALL = 0x20000000, // active rogue safe fall spell (passive)
|
||||
MOVEFLAG_HOVER = 0x40000000
|
||||
|
Loading…
x
Reference in New Issue
Block a user