physics: implement feather fall and water walk movement flag tracking

Feather Fall (SMSG_MOVE_FEATHER_FALL / SMSG_MOVE_NORMAL_FALL):
- Add FEATHER_FALL = 0x00004000 to MovementFlags enum
- Fix handlers to set/clear the flag instead of passing flag=0
- Cap downward terminal velocity at -2.0 m/s in CameraController when
  feather fall is active (Slow Fall, Parachute, etc.)

All three handlers now correctly propagate server movement state flags
that were previously acknowledged without updating any local state.
This commit is contained in:
Kelsi 2026-03-10 13:14:52 -07:00
parent 701cb94ba6
commit 0b99cbafb2
6 changed files with 15 additions and 2 deletions

View file

@ -726,6 +726,9 @@ void CameraController::update(float deltaTime) {
else verticalVelocity *= std::max(0.0f, 1.0f - 3.0f * physicsDeltaTime);
} else {
verticalVelocity += gravity * physicsDeltaTime;
// Feather Fall / Slow Fall: cap downward terminal velocity to ~2 m/s
if (featherFallActive_ && verticalVelocity < -2.0f)
verticalVelocity = -2.0f;
}
targetPos.z += verticalVelocity * physicsDeltaTime;
}