mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-01 19:46:42 +01:00
Fixed bumpy pegasus flight patterns (also fixed diving)
This commit is contained in:
parent
bdedeeece4
commit
96b14aa1c3
1 changed files with 8 additions and 3 deletions
|
@ -696,7 +696,10 @@ public class PlayerPhysics extends EntityPhysics<PlayerEntity> implements Tickab
|
||||||
if (manualFlap) {
|
if (manualFlap) {
|
||||||
descentRate -= 0.5;
|
descentRate -= 0.5;
|
||||||
} else {
|
} 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<PlayerEntity> implements Tickab
|
||||||
|
|
||||||
Vec3d direction = entity.getRotationVec(1).normalize().multiply(thrustStrength);
|
Vec3d direction = entity.getRotationVec(1).normalize().multiply(thrustStrength);
|
||||||
|
|
||||||
if (hovering) {
|
if (hovering || !manualFlap) {
|
||||||
if (entity.isSneaking()) {
|
if (entity.isSneaking()) {
|
||||||
velocity.y -= 0.2F;
|
velocity.y -= 0.006F;
|
||||||
|
} else {
|
||||||
|
velocity.y *= 1 - thrustScale;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
velocity.x += direction.x * 1.3F;
|
velocity.x += direction.x * 1.3F;
|
||||||
|
|
Loading…
Reference in a new issue