mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-29 16:43:47 +00:00
fix(Core/Movement): Add force speed ack to async movement and resolve stutter (#23371)
This commit is contained in:
@@ -624,6 +624,28 @@ typedef std::unordered_map<uint32, uint32> PacketCooldowns;
|
||||
|
||||
struct SpellProcEventEntry; // used only privately
|
||||
|
||||
enum class SpeedOpcodeIndex : uint32
|
||||
{
|
||||
PC,
|
||||
NPC,
|
||||
ACK_RESPONSE,
|
||||
MAX
|
||||
};
|
||||
|
||||
typedef const Opcodes SpeedOpcodePair[static_cast<size_t>(SpeedOpcodeIndex::MAX)];
|
||||
SpeedOpcodePair SetSpeed2Opc_table[MAX_MOVE_TYPE] =
|
||||
{
|
||||
{SMSG_FORCE_WALK_SPEED_CHANGE, SMSG_SPLINE_SET_WALK_SPEED, MSG_MOVE_SET_WALK_SPEED},
|
||||
{SMSG_FORCE_RUN_SPEED_CHANGE, SMSG_SPLINE_SET_RUN_SPEED, MSG_MOVE_SET_RUN_SPEED},
|
||||
{SMSG_FORCE_RUN_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_RUN_BACK_SPEED, MSG_MOVE_SET_RUN_BACK_SPEED},
|
||||
{SMSG_FORCE_SWIM_SPEED_CHANGE, SMSG_SPLINE_SET_SWIM_SPEED, MSG_MOVE_SET_SWIM_SPEED},
|
||||
{SMSG_FORCE_SWIM_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_SWIM_BACK_SPEED, MSG_MOVE_SET_SWIM_BACK_SPEED},
|
||||
{SMSG_FORCE_TURN_RATE_CHANGE, SMSG_SPLINE_SET_TURN_RATE, MSG_MOVE_SET_TURN_RATE},
|
||||
{SMSG_FORCE_FLIGHT_SPEED_CHANGE, SMSG_SPLINE_SET_FLIGHT_SPEED, MSG_MOVE_SET_FLIGHT_SPEED},
|
||||
{SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE, SMSG_SPLINE_SET_FLIGHT_BACK_SPEED, MSG_MOVE_SET_FLIGHT_BACK_SPEED},
|
||||
{SMSG_FORCE_PITCH_RATE_CHANGE, SMSG_SPLINE_SET_PITCH_RATE, MSG_MOVE_SET_PITCH_RATE},
|
||||
};
|
||||
|
||||
class Unit : public WorldObject
|
||||
{
|
||||
public:
|
||||
@@ -1681,7 +1703,7 @@ public:
|
||||
void MonsterMoveWithSpeed(float x, float y, float z, float speed); // Not to be used outside of cinematics
|
||||
|
||||
virtual bool SetWalk(bool enable);
|
||||
virtual bool SetDisableGravity(bool disable, bool packetOnly = false, bool updateAnimationTier = true);
|
||||
void SetDisableGravity(bool disable);
|
||||
virtual bool SetSwim(bool enable);
|
||||
void SetCanFly(bool enable);
|
||||
void SetWaterWalking(bool enable);
|
||||
|
||||
Reference in New Issue
Block a user