mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
physics: implement Water Walk movement state tracking and surface clamping
SMSG_MOVE_WATER_WALK / SMSG_MOVE_LAND_WALK now correctly set/clear WATER_WALK (0x00008000) in movementInfo.flags, ensuring the flag is included in movement ACKs sent to the server. In CameraController, when waterWalkActive_ is set and the player is at or above the water surface (within 0.5 units), clamp them to the water surface and mark as grounded — preventing water entry and allowing them to walk across the water surface as the spell intends.
This commit is contained in:
parent
0b99cbafb2
commit
1853e8aa56
6 changed files with 20 additions and 3 deletions
|
|
@ -2459,7 +2459,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
static_cast<uint32_t>(MovementFlags::FEATHER_FALL), true);
|
||||
break;
|
||||
case Opcode::SMSG_MOVE_WATER_WALK:
|
||||
handleForceMoveFlagChange(packet, "WATER_WALK", Opcode::CMSG_MOVE_WATER_WALK_ACK, 0, true);
|
||||
handleForceMoveFlagChange(packet, "WATER_WALK", Opcode::CMSG_MOVE_WATER_WALK_ACK,
|
||||
static_cast<uint32_t>(MovementFlags::WATER_WALK), true);
|
||||
break;
|
||||
case Opcode::SMSG_MOVE_SET_HOVER:
|
||||
handleForceMoveFlagChange(packet, "SET_HOVER", Opcode::CMSG_MOVE_HOVER_ACK,
|
||||
|
|
@ -5588,7 +5589,8 @@ void GameHandler::handlePacket(network::Packet& packet) {
|
|||
static_cast<uint32_t>(MovementFlags::LEVITATING), false);
|
||||
break;
|
||||
case Opcode::SMSG_MOVE_LAND_WALK:
|
||||
handleForceMoveFlagChange(packet, "LAND_WALK", Opcode::CMSG_MOVE_WATER_WALK_ACK, 0, false);
|
||||
handleForceMoveFlagChange(packet, "LAND_WALK", Opcode::CMSG_MOVE_WATER_WALK_ACK,
|
||||
static_cast<uint32_t>(MovementFlags::WATER_WALK), false);
|
||||
break;
|
||||
case Opcode::SMSG_MOVE_NORMAL_FALL:
|
||||
handleForceMoveFlagChange(packet, "NORMAL_FALL", Opcode::CMSG_MOVE_FEATHER_FALL_ACK,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue