Skip to content

Commit

Permalink
Fix gravity, half-fix look close bug
Browse files Browse the repository at this point in the history
  • Loading branch information
fullwall committed Apr 26, 2019
1 parent 3d893d8 commit e4717d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Expand Up @@ -418,7 +418,7 @@ public void tick() {
updatePackets(navigating);
if (!navigating && getBukkitEntity() != null && npc.getTrait(Gravity.class).hasGravity()
&& Util.isLoaded(getBukkitEntity().getLocation(LOADED_LOCATION))) {
a(0, 0, 0);
e(new Vec3D(0, 0, 0));
}
Vec3D mot = getMot();
if (Math.abs(mot.getX()) < EPSILON && Math.abs(mot.getY()) < EPSILON && Math.abs(mot.getZ()) < EPSILON) {
Expand Down
Expand Up @@ -23,16 +23,15 @@ public void a() {
if (!NMSImpl.isNavigationFinished(this.a.getNavigation()))
return;
if (this.b()) {
this.a.pitch = 0.0F;
// this.a.pitch = 0.0F;
}

if (this.d) {
this.d = false;
this.a.aM = this.a(this.a.aM, this.h(), this.b);
this.a.yaw = this.a.aM;
this.a.pitch = this.a(this.a.pitch, this.g(), this.c);
} else {
this.a.aM = this.a(this.a.aM, this.a.aK, 10.0F);
// this.a.aM = this.a(this.a.aM, this.a.aK, 10.0F);
}

if (!this.a.getNavigation().n()) {
Expand Down

0 comments on commit e4717d4

Please sign in to comment.