physics: implement HOVER movement flag physics in CameraController

When the server sets MovementFlags::HOVER (SMSG_MOVE_SET_HOVER), the
player now floats 4 yards above the nearest ground surface instead of
standing on it. Uses the existing floor-snap path with a HOVER_HEIGHT
offset applied to the snap target.

- game_handler.hpp: add isHovering() accessor (reads HOVER flag from
  movementInfo.flags, which is already set by handleForceMoveFlagChange)
- camera_controller.hpp: add hoverActive_ field and setHoverActive()
- camera_controller.cpp: apply HOVER_HEIGHT = 4.0f offset at floor snap
- application.cpp: sync hover state each frame alongside other movement
  states (gravity, feather fall, water walk, flying)
This commit is contained in:
Kelsi 2026-03-10 13:39:23 -07:00
parent 56ec49f837
commit 23293d6453
4 changed files with 11 additions and 1 deletions

View file

@ -102,6 +102,7 @@ public:
void setFeatherFallActive(bool active) { featherFallActive_ = active; }
void setWaterWalkActive(bool active) { waterWalkActive_ = active; }
void setFlyingActive(bool active) { flyingActive_ = active; }
void setHoverActive(bool active) { hoverActive_ = active; }
void setMounted(bool m) { mounted_ = m; }
void setMountHeightOffset(float offset) { mountHeightOffset_ = offset; }
void setExternalFollow(bool enabled) { externalFollow_ = enabled; }
@ -292,6 +293,8 @@ private:
bool waterWalkActive_ = false;
// Player-controlled flight (CAN_FLY + FLYING): 3D movement, no gravity.
bool flyingActive_ = false;
// Server-driven hover (HOVER flag): float at fixed height above ground.
bool hoverActive_ = false;
bool mounted_ = false;
float mountHeightOffset_ = 0.0f;
bool externalMoving_ = false;