1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Extend pitch fly mode to swimming (#7943)

This commit is contained in:
random-geek 2018-12-30 16:07:30 -08:00 committed by Paramat
parent 7d7ccf5c0f
commit aa5ec2ec02
12 changed files with 38 additions and 28 deletions

View file

@ -170,7 +170,8 @@ void ClientEnvironment::step(float dtime)
lplayer->physics_override_gravity * dtime_part * 2.0f;
// Liquid floating / sinking
if (lplayer->in_liquid && !lplayer->swimming_vertical)
if (lplayer->in_liquid && !lplayer->swimming_vertical &&
!lplayer->swimming_pitch)
speed.Y -= lplayer->movement_liquid_sink * dtime_part * 2.0f;
// Liquid resistance