优化a10自动回正和调整武器挂载点
This commit is contained in:
parent
81582c4e16
commit
8a03b1a10c
3 changed files with 373 additions and 368 deletions
|
@ -221,8 +221,8 @@ public class AircraftOverlay implements LayeredDraw.Layer {
|
||||||
// 准星
|
// 准星
|
||||||
if (pCross != null) {
|
if (pCross != null) {
|
||||||
poseStack.pushPose();
|
poseStack.pushPose();
|
||||||
float x = (float) pCross.x + (zoomVehicle ? 6 : 2);
|
float x = (float) pCross.x + (zoomVehicle ? 8 * (float) (Minecraft.getInstance().options.fov().get() / 70) : 3);
|
||||||
float y = (float) pCross.y + (zoomVehicle ? 15 : 5);
|
float y = (float) pCross.y + (zoomVehicle ? 25 * (float) (Minecraft.getInstance().options.fov().get() / 70) : 5);
|
||||||
|
|
||||||
if (mc.options.getCameraType() == CameraType.FIRST_PERSON && !(mobileVehicle instanceof A10Entity a10Entity && a10Entity.getWeaponIndex(0) == 3)) {
|
if (mc.options.getCameraType() == CameraType.FIRST_PERSON && !(mobileVehicle instanceof A10Entity a10Entity && a10Entity.getWeaponIndex(0) == 3)) {
|
||||||
RenderSystem.disableDepthTest();
|
RenderSystem.disableDepthTest();
|
||||||
|
|
|
@ -540,7 +540,12 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!onGround()) {
|
if (!onGround()) {
|
||||||
this.setZRot(this.roll * 0.98f);
|
float speed = Mth.clamp(Mth.abs(roll) / 90, 0, 1);
|
||||||
|
if (this.roll > 0) {
|
||||||
|
setZRot(roll - Math.min(speed, roll));
|
||||||
|
} else if (this.roll < 0){
|
||||||
|
setZRot(roll + Math.min(speed, -roll));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setPropellerRot(this.getPropellerRot() + 30 * this.entityData.get(POWER));
|
this.setPropellerRot(this.getPropellerRot() + 30 * this.entityData.get(POWER));
|
||||||
|
@ -832,16 +837,16 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
Vector4f worldPosition;
|
Vector4f worldPosition;
|
||||||
|
|
||||||
if (fireIndex == 0) {
|
if (fireIndex == 0) {
|
||||||
worldPosition = transformPosition(transform, -6.63f, -0.55f, 1.83f);
|
worldPosition = transformPosition(transform, -3.9321875f, -1.38680625f, 0.12965f);
|
||||||
fireIndex = 1;
|
fireIndex = 1;
|
||||||
} else if (fireIndex == 1) {
|
} else if (fireIndex == 1) {
|
||||||
worldPosition = transformPosition(transform, -5.28f, -1.76f, 1.87f);
|
worldPosition = transformPosition(transform, -1.56875f, -1.443f, 0.1272f);
|
||||||
fireIndex = 2;
|
fireIndex = 2;
|
||||||
} else if (fireIndex == 2) {
|
} else if (fireIndex == 2) {
|
||||||
worldPosition = transformPosition(transform, 5.28f, -1.76f, 1.87f);
|
worldPosition = transformPosition(transform, 1.56875f, -1.443f, 0.1272f);
|
||||||
fireIndex = 3;
|
fireIndex = 3;
|
||||||
} else {
|
} else {
|
||||||
worldPosition = transformPosition(transform, 6.63f, -0.55f, 1.83f);
|
worldPosition = transformPosition(transform, 3.9321875f, -1.38680625f, 0.12965f);
|
||||||
fireIndex = 0;
|
fireIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -896,13 +901,13 @@ public class A10Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
Vector4f worldPosition;
|
Vector4f worldPosition;
|
||||||
|
|
||||||
if (this.getEntityData().get(LOADED_MISSILE) == 4) {
|
if (this.getEntityData().get(LOADED_MISSILE) == 4) {
|
||||||
worldPosition = transformPosition(transform, 1.56875f, -0.943f - 0.5f, 0.1272f);
|
worldPosition = transformPosition(transform, 5.28f, -1.76f, 1.87f);
|
||||||
} else if (this.getEntityData().get(LOADED_MISSILE) == 3) {
|
} else if (this.getEntityData().get(LOADED_MISSILE) == 3) {
|
||||||
worldPosition = transformPosition(transform, -1.56875f, -0.943f - 0.5f, 0.1272f);
|
worldPosition = transformPosition(transform, -5.28f, -1.76f, 1.87f);
|
||||||
} else if (this.getEntityData().get(LOADED_MISSILE) == 2) {
|
} else if (this.getEntityData().get(LOADED_MISSILE) == 2) {
|
||||||
worldPosition = transformPosition(transform, 3.9321875f, -0.88680625f - 0.5f, 0.12965f);
|
worldPosition = transformPosition(transform, 6.63f, -0.55f, 1.83f);
|
||||||
} else {
|
} else {
|
||||||
worldPosition = transformPosition(transform, -3.9321875f, -0.88680625f - 0.5f, 0.12965f);
|
worldPosition = transformPosition(transform, -6.63f, -0.55f, 1.83f);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (locked) {
|
if (locked) {
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue