From 9217fbf53ed40a72da7cfb789a756d428db64eee Mon Sep 17 00:00:00 2001 From: neo2003 Date: Fri, 3 Apr 2015 23:19:23 +0100 Subject: [PATCH] [Core] reapply Properly display creatures with waypoint when they enter player range (b95d077a408ca33c7094d304276848f50ffc8e8b) --- src/game/Object/Object.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/game/Object/Object.cpp b/src/game/Object/Object.cpp index 703f4311..cfe24e85 100644 --- a/src/game/Object/Object.cpp +++ b/src/game/Object/Object.cpp @@ -261,6 +261,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_MOVE_FORWARD | MOVEFLAG_SPLINE_ENABLED; + } *data << uint32(moveFlags); // movement flags *data << uint32(WorldTimer::getMSTime()); // time (in milliseconds)