physics: disable gravity when server sends SMSG_MOVE_GRAVITY_DISABLE

SMSG_MOVE_GRAVITY_DISABLE/ENABLE now correctly set/clear the LEVITATING
movement flag instead of passing flag=0. GameHandler::isGravityDisabled()
reads the LEVITATING bit and is synced to CameraController each frame.

When gravity is disabled the physics loop bleeds off downward velocity
and skips gravity accumulation, so Levitate and similar effects actually
float the player rather than letting them fall through the world.
This commit is contained in:
Kelsi 2026-03-10 13:07:34 -07:00
parent dd6f6d1174
commit f2337aeaa7
5 changed files with 19 additions and 4 deletions

View file

@ -1010,6 +1010,7 @@ void Application::update(float deltaTime) {
if (renderer && gameHandler && renderer->getCameraController()) {
renderer->getCameraController()->setRunSpeedOverride(gameHandler->getServerRunSpeed());
renderer->getCameraController()->setMovementRooted(gameHandler->isPlayerRooted());
renderer->getCameraController()->setGravityDisabled(gameHandler->isGravityDisabled());
}
bool onTaxi = gameHandler &&