mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Fix clang warning
This commit is contained in:
parent
fdede60034
commit
b872df6ef6
1 changed files with 1 additions and 1 deletions
|
@ -460,7 +460,7 @@ void Camera::update(LocalPlayer* player, f32 frametime, f32 busytime,
|
||||||
// start (or continue) the view bobbing animation.
|
// start (or continue) the view bobbing animation.
|
||||||
v3f speed = player->getSpeed();
|
v3f speed = player->getSpeed();
|
||||||
const bool movement_XZ = hypot(speed.X, speed.Z) > BS;
|
const bool movement_XZ = hypot(speed.X, speed.Z) > BS;
|
||||||
const bool movement_Y = abs(speed.Y) > BS;
|
const bool movement_Y = fabs(speed.Y) > BS;
|
||||||
|
|
||||||
const bool walking = movement_XZ && player->touching_ground;
|
const bool walking = movement_XZ && player->touching_ground;
|
||||||
const bool swimming = (movement_XZ || player->swimming_vertical) && player->in_liquid;
|
const bool swimming = (movement_XZ || player->swimming_vertical) && player->in_liquid;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue