mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-17 09:33:51 +00:00
fix: handle transport data in other player movement packets
Other players on transports (boats, zeppelins, trams) were not properly tracked because handleOtherPlayerMovement() did not read transport data from MSG_MOVE_* packets. This caused entities to slide off transports between movement updates since no transport attachment was established. Now reads the transport GUID and local offset from the packet using expansion-aware wire flags (0x200 for WotLK/TBC, 0x02000000 for Classic/Turtle), registers a transport attachment so the entity follows the transport smoothly via updateAttachedTransportChildren(), and clears the attachment when the player disembarks.
This commit is contained in:
parent
f5297f9945
commit
1152a70201
2 changed files with 45 additions and 0 deletions
|
|
@ -26,6 +26,10 @@ public:
|
|||
// Classic: none, TBC: u8, WotLK: u16.
|
||||
virtual uint8_t movementFlags2Size() const { return 2; }
|
||||
|
||||
// Wire-format movement flag that gates transport data in MSG_MOVE_* payloads.
|
||||
// WotLK/TBC: 0x200, Classic/Turtle: 0x02000000.
|
||||
virtual uint32_t wireOnTransportFlag() const { return 0x00000200; }
|
||||
|
||||
// --- Movement ---
|
||||
|
||||
/** Parse movement block from SMSG_UPDATE_OBJECT */
|
||||
|
|
@ -380,6 +384,7 @@ public:
|
|||
class ClassicPacketParsers : public TbcPacketParsers {
|
||||
public:
|
||||
uint8_t movementFlags2Size() const override { return 0; }
|
||||
uint32_t wireOnTransportFlag() const override { return 0x02000000; }
|
||||
bool parseCharEnum(network::Packet& packet, CharEnumResponse& response) override;
|
||||
bool parseMovementBlock(network::Packet& packet, UpdateBlock& block) override;
|
||||
void writeMovementPayload(network::Packet& packet, const MovementInfo& info) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue