From 4444cf2b5a8002272cfeb700237b76f3ef9b1094 Mon Sep 17 00:00:00 2001 From: Kai Date: Sat, 23 Dec 2023 01:01:56 +0100 Subject: [PATCH] fix: player controlled dragon walking speed --- .../iceandfire/entity/EntityDragonBase.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/github/alexthe666/iceandfire/entity/EntityDragonBase.java b/src/main/java/com/github/alexthe666/iceandfire/entity/EntityDragonBase.java index 698f1fa56..4c44a998d 100644 --- a/src/main/java/com/github/alexthe666/iceandfire/entity/EntityDragonBase.java +++ b/src/main/java/com/github/alexthe666/iceandfire/entity/EntityDragonBase.java @@ -2070,7 +2070,7 @@ public void travel(@NotNull Vec3 pTravelVector) { // Note: when motion is handled by the client no server side setDeltaMovement() should be called // otherwise the movement will halt // Todo: move wrongly fix - float flyingSpeed; + float flyingSpeed; // FIXME :: Why overlay the flyingSpeed variable from LivingEntity if (allowLocalMotionControl && this.getControllingPassenger() != null) { LivingEntity rider = this.getControllingPassenger(); if (rider == null) { @@ -2204,7 +2204,7 @@ else if (isInWater() || isInLava()) { // Walking control else { double forward = rider.zza; - double strafing = rider.xxa; + double strafing = rider.xxa * 0.5f; // Inherit y motion for dropping double vertical = pTravelVector.y; float speed = (float) this.getAttributeValue(Attributes.MOVEMENT_SPEED); @@ -2217,13 +2217,9 @@ else if (isInWater() || isInLava()) { forward *= rider.isSprinting() ? 1.2f : 1.0f; // Slower going back forward *= rider.zza > 0 ? 1.0f : 0.2f; - // Slower going sideway - strafing *= 0.05f; if (this.isControlledByLocalInstance()) { - flyingSpeed = speed * 0.1F; - this.setSpeed(flyingSpeed); - + this.setSpeed(speed); // Vanilla walking behavior includes going up steps super.travel(new Vec3(strafing, vertical, forward)); } else { @@ -2231,7 +2227,6 @@ else if (isInWater() || isInLava()) { } this.tryCheckInsideBlocks(); this.updatePitch(this.yOld - this.getY()); - return; } } // No rider move control