Skip to content

Commit 939a9c1

Browse files
committed
fix player controlled dragon walking speed
1 parent efb2d40 commit 939a9c1

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/main/java/com/github/alexthe666/iceandfire/entity/EntityDragonBase.java

+3-8
Original file line numberDiff line numberDiff line change
@@ -2071,7 +2071,7 @@ public void travel(@NotNull Vec3 pTravelVector) {
20712071
// Note: when motion is handled by the client no server side setDeltaMovement() should be called
20722072
// otherwise the movement will halt
20732073
// Todo: move wrongly fix
2074-
float flyingSpeed;
2074+
float flyingSpeed; // FIXME :: Why overlay the flyingSpeed variable from LivingEntity
20752075
if (allowLocalMotionControl && this.getControllingPassenger() != null) {
20762076
LivingEntity rider = this.getControllingPassenger();
20772077
if (rider == null) {
@@ -2205,7 +2205,7 @@ else if (isInWater() || isInLava()) {
22052205
// Walking control
22062206
else {
22072207
double forward = rider.zza;
2208-
double strafing = rider.xxa;
2208+
double strafing = rider.xxa * 0.5f;
22092209
// Inherit y motion for dropping
22102210
double vertical = pTravelVector.y;
22112211
float speed = (float) this.getAttributeValue(Attributes.MOVEMENT_SPEED);
@@ -2218,21 +2218,16 @@ else if (isInWater() || isInLava()) {
22182218
forward *= rider.isSprinting() ? 1.2f : 1.0f;
22192219
// Slower going back
22202220
forward *= rider.zza > 0 ? 1.0f : 0.2f;
2221-
// Slower going sideway
2222-
strafing *= 0.05f;
22232221

22242222
if (this.isControlledByLocalInstance()) {
2225-
flyingSpeed = speed * 0.1F;
2226-
this.setSpeed(flyingSpeed);
2227-
2223+
this.setSpeed(speed);
22282224
// Vanilla walking behavior includes going up steps
22292225
super.travel(new Vec3(strafing, vertical, forward));
22302226
} else {
22312227
this.setDeltaMovement(Vec3.ZERO);
22322228
}
22332229
this.tryCheckInsideBlocks();
22342230
this.updatePitch(this.yOld - this.getY());
2235-
return;
22362231
}
22372232
}
22382233
// No rider move control

0 commit comments

Comments
 (0)