From 96b14aa1c3960f875b1e49b91c26ac35dab1884f Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 21 Apr 2024 23:07:30 +0100 Subject: [PATCH] Fixed bumpy pegasus flight patterns (also fixed diving) --- .../unicopia/entity/player/PlayerPhysics.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java index 19d37345..0cb1f1b4 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java @@ -696,7 +696,10 @@ public class PlayerPhysics extends EntityPhysics implements Tickab if (manualFlap) { descentRate -= 0.5; } else { - descentRate = Math.max(0, descentRate / 2); + descentRate *= 0.25F; + if (velocity.y < 0) { + velocity.y *= 0.6F; + } } } } @@ -710,9 +713,11 @@ public class PlayerPhysics extends EntityPhysics implements Tickab Vec3d direction = entity.getRotationVec(1).normalize().multiply(thrustStrength); - if (hovering) { + if (hovering || !manualFlap) { if (entity.isSneaking()) { - velocity.y -= 0.2F; + velocity.y -= 0.006F; + } else { + velocity.y *= 1 - thrustScale; } } else { velocity.x += direction.x * 1.3F;