mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
physics: implement player-controlled flying mount physics
When CAN_FLY + FLYING movement flags are both set (flying mounts, Druid Flight Form), the CameraController now uses 3D pitch-following movement instead of ground physics: - Forward/back follows the camera's 3D look direction (ascend when looking up, descend when looking down) - Space = ascend vertically, X (while mounted) = descend - No gravity, no grounding, no jump coyote time - Fall-damage checks suppressed (grounded=true) Also wire up all remaining server movement state flags to CameraController: - Feather Fall: cap terminal velocity at -2 m/s - Water Walk: clamp to water surface, skip swim entry - Flying: 3D movement with no gravity All states synced each frame from GameHandler via isPlayerFlying(), isFeatherFalling(), isWaterWalking(), isGravityDisabled().
This commit is contained in:
parent
1853e8aa56
commit
27d18b2189
4 changed files with 39 additions and 1 deletions
|
|
@ -99,6 +99,7 @@ public:
|
|||
void setGravityDisabled(bool disabled) { gravityDisabled_ = disabled; }
|
||||
void setFeatherFallActive(bool active) { featherFallActive_ = active; }
|
||||
void setWaterWalkActive(bool active) { waterWalkActive_ = active; }
|
||||
void setFlyingActive(bool active) { flyingActive_ = active; }
|
||||
void setMounted(bool m) { mounted_ = m; }
|
||||
void setMountHeightOffset(float offset) { mountHeightOffset_ = offset; }
|
||||
void setExternalFollow(bool enabled) { externalFollow_ = enabled; }
|
||||
|
|
@ -285,6 +286,8 @@ private:
|
|||
bool featherFallActive_ = false;
|
||||
// Server-driven water walk: treat water surface as ground (don't swim).
|
||||
bool waterWalkActive_ = false;
|
||||
// Player-controlled flight (CAN_FLY + FLYING): 3D movement, no gravity.
|
||||
bool flyingActive_ = false;
|
||||
bool mounted_ = false;
|
||||
float mountHeightOffset_ = 0.0f;
|
||||
bool externalMoving_ = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue