调整HK416的开火抖动

This commit is contained in:
Atsuihsio 2024-08-01 22:11:26 +08:00
parent 5171d31245
commit fbd3052225
6 changed files with 10 additions and 10 deletions

View file

@ -56,7 +56,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
gun.setPosX(3.28f * (float) p); gun.setPosX(3.28f * (float) p);
gun.setPosY(1.04f * (float) p - (float) (0.2f * zp)); gun.setPosY(1.04f * (float) p - (float) (0.2f * zp));
gun.setPosZ(4f * (float) p + (float) (0.3f * zp)); gun.setPosZ(6f * (float) p + (float) (0.3f * zp));
gun.setRotZ((float) (0.05f * zp)); gun.setRotZ((float) (0.05f * zp));
scope.setScaleZ(1f - (0.5f * (float) p)); scope.setScaleZ(1f - (0.5f * (float) p));
@ -67,15 +67,15 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
double fr = player.getPersistentData().getDouble("fire_rot"); double fr = player.getPersistentData().getDouble("fire_rot");
if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) { if ((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).zooming) {
shen.setPosY(0.05f * (float) (fp + 2 * fr)); shen.setPosY(-0.01f * (float) (fp + 2 * fr));
holo.setPosY(-0.43f * (float) (fp + 2.3 * fr)); shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
shen.setPosZ(1.1f * (float) (fp + 0.54f * fr)); shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotX(0.015f * (float) (fp + fr)); shen.setRotZ(0f);
} else { } else {
shen.setPosY(0.04f * (float) (fp + 2 * fr)); shen.setPosY(-0.03f * (float) (fp + 2 * fr));
shen.setPosZ(1.2f * (float) (fp + 0.54f * fr)); shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
shen.setRotX(0.03f * (float) (0.18f * fp + fr)); shen.setRotX(0.07f * (float) (0.18f * fp + fr));
shen.setRotZ(-0.01f * (float) (fp + 1.3 * fr)); shen.setRotZ(-0.04f * (float) (fp + 1.3 * fr));
} }
shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp)); shen.setPosX(0.5f * (float)fr * (float)((player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables())).recoilHorizon * fp));

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 B

After

Width:  |  Height:  |  Size: 528 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 B

After

Width:  |  Height:  |  Size: 337 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 B

After

Width:  |  Height:  |  Size: 321 B