mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +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
|
|
@ -98,6 +98,7 @@ public:
|
|||
bool isMovementRooted() const { return movementRooted_; }
|
||||
void setGravityDisabled(bool disabled) { gravityDisabled_ = disabled; }
|
||||
void setFeatherFallActive(bool active) { featherFallActive_ = active; }
|
||||
void setWaterWalkActive(bool active) { waterWalkActive_ = active; }
|
||||
void setMounted(bool m) { mounted_ = m; }
|
||||
void setMountHeightOffset(float offset) { mountHeightOffset_ = offset; }
|
||||
void setExternalFollow(bool enabled) { externalFollow_ = enabled; }
|
||||
|
|
@ -282,6 +283,8 @@ private:
|
|||
bool gravityDisabled_ = false;
|
||||
// Server-driven feather fall: cap downward velocity to slow-fall terminal.
|
||||
bool featherFallActive_ = false;
|
||||
// Server-driven water walk: treat water surface as ground (don't swim).
|
||||
bool waterWalkActive_ = false;
|
||||
bool mounted_ = false;
|
||||
float mountHeightOffset_ = 0.0f;
|
||||
bool externalMoving_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue