aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp2
-rw-r--r--src/game/Unit.h15
2 files changed, 14 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 21a489f188c..8ba170a84f1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -394,7 +394,7 @@ void Unit::SendMonsterMove(float NewPosX, float NewPosY, float NewPosZ, uint8 ty
}
//Movement Flags (0x0 = walk, 0x100 = run, 0x200 = fly/swim)
- data << uint32(GetTypeId() == TYPEID_PLAYER ? MOVEMENTFLAG_WALK_MODE : MovementFlags);
+ data << uint32((MovementFlags & MOVEMENTFLAG_LEVITATING) ? MOVEFLAG_FLY : MOVEFLAG_WALK);
data << Time; // Time in between points
data << uint32(1); // 1 single waypoint
diff --git a/src/game/Unit.h b/src/game/Unit.h
index 64ac958ee2a..6fd7815c32b 100644
--- a/src/game/Unit.h
+++ b/src/game/Unit.h
@@ -529,6 +529,17 @@ enum NPCFlags
UNIT_NPC_FLAG_OUTDOORPVP = 0x20000000, // custom flag for outdoor pvp creatures
};
+enum MoveFlags
+{
+ MOVEFLAG_NONE = 0x00000000,
+ MOVEFLAG_SLIDE = 0x00000002,
+ MOVEFLAG_MARCH_ON_SPOT = 0x00000004,
+ MOVEFLAG_JUMP = 0x00000008,
+ MOVEFLAG_WALK = 0x00000100,
+ MOVEFLAG_FLY = 0x00000200, //For dragon (+walk = glide)
+ MOVEFLAG_ORIENTATION = 0x00000400, //Fix orientation
+};
+
enum MovementFlags
{
MOVEMENTFLAG_NONE = 0x00000000,
@@ -540,8 +551,8 @@ enum MovementFlags
MOVEMENTFLAG_RIGHT = 0x00000020,
MOVEMENTFLAG_PITCH_UP = 0x00000040,
MOVEMENTFLAG_PITCH_DOWN = 0x00000080,
- MOVEMENTFLAG_WALK_MODE = 0x00000100, // Walking
- MOVEMENTFLAG_ONTRANSPORT = 0x00000200, // Used for flying on some creatures
+ MOVEMENTFLAG_WALK_MODE = 0x00000100,
+ MOVEMENTFLAG_ONTRANSPORT = 0x00000200,
MOVEMENTFLAG_LEVITATING = 0x00000400,
MOVEMENTFLAG_FLY_UNK1 = 0x00000800,
MOVEMENTFLAG_JUMPING = 0x00001000,