From c0f92a71e484b666c317b08db1e02ca3caff8f66 Mon Sep 17 00:00:00 2001 From: Atsuishio <842960157@qq.com> Date: Mon, 19 May 2025 01:06:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=99=8D=E4=BD=8EA10=E6=B0=B4=E5=B9=B3?= =?UTF-8?q?=E9=A3=9E=E6=97=B6=E7=9A=84=E8=BD=AC=E5=BC=AF=E9=80=9F=E5=BA=A6?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8DAGM=E8=B6=8A=E9=A3=9E=E8=B6=8A?= =?UTF-8?q?=E6=85=A2=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../superbwarfare/entity/projectile/Agm65Entity.java | 2 +- .../atsuishio/superbwarfare/entity/vehicle/A10Entity.java | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/Agm65Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/Agm65Entity.java index 79a8e4189..3f1452145 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/projectile/Agm65Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/projectile/Agm65Entity.java @@ -244,7 +244,7 @@ public class Agm65Entity extends FastThrowableProjectile implements GeoEntity, D if (this.tickCount > 8) { boolean lostTarget = (VectorTool.calculateAngle(getDeltaMovement(), toVec) > 80); if (!lostTarget) { - setDeltaMovement(getDeltaMovement().add(toVec.scale(1.4)).scale(0.25).add(entity.getDeltaMovement())); + setDeltaMovement(getDeltaMovement().add(toVec.scale(4)).scale(0.65).add(entity.getDeltaMovement().scale(0.2))); } } } diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java index 6eb7fcd97..d46c26a41 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/vehicle/A10Entity.java @@ -538,9 +538,11 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity this.consumeEnergy((int) (Mth.abs(this.entityData.get(POWER)) * VehicleConfig.A_10_MAX_ENERGY_COST.get())); } - float addY = Mth.clamp(Math.max((this.onGround() ? 0.1f : 0.2f) * (float) getDeltaMovement().length(), 0f) * diffY, -3.5f, 3.5f); - float addX = Mth.clamp(Math.min((float) Math.max(getDeltaMovement().dot(getViewVector(1)) - 0.17, 0.01), 0.7f) * diffX, -3.5f, 3.5f); - float addZ = this.entityData.get(DELTA_ROT) - (this.onGround() ? 0 : 0.01f) * diffY * (float) getDeltaMovement().dot(getViewVector(1)); + float rotSpeed = 1.5f + 2 * Mth.abs(VectorTool.calculateY(getRoll())); + + float addY = Mth.clamp(Math.max((this.onGround() ? 0.1f : 0.2f) * (float) getDeltaMovement().length(), 0f) * diffY, -rotSpeed, rotSpeed); + float addX = Mth.clamp(Math.min((float) Math.max(getDeltaMovement().dot(getViewVector(1)) - 0.17, 0.04), 0.7f) * diffX, -3.5f, 3.5f); + float addZ = this.entityData.get(DELTA_ROT) - (this.onGround() ? 0 : 0.004f) * diffY * (float) getDeltaMovement().dot(getViewVector(1)); float i = getXRot() / 80;