又是修复动画bug

This commit is contained in:
Atsuihsio 2024-06-03 01:33:48 +08:00
parent 1381476c7e
commit 89f3852a42
22 changed files with 23 additions and 0 deletions

View file

@ -83,6 +83,7 @@ public class AK47ItemModel extends GeoModel<AK47Item> {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -56,6 +56,7 @@ public class Aa12ItemModel extends GeoModel<Aa12Item> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(5f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -119,6 +119,7 @@ public class BocekItemModel extends GeoModel<BocekItem> {
fire.setPosY(-0.01f * (float) (fp + 2 * fr));
fire.setPosZ(3f * (float) (fp + 0.54f * fr));
fire.setRotX(0.003f * (float) (fp + fr));
fire.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
fire.setRotY(0.015f * (float) fr);
} else {

View file

@ -69,6 +69,7 @@ public class DevotionItemModel extends GeoModel<Devotion> {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.4f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -80,6 +80,7 @@ public class Hk416ItemModel extends GeoModel<Hk416Item> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -57,6 +57,7 @@ public class HuntingRifleItemModel extends GeoModel<HuntingRifle> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.1f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -50,6 +50,7 @@ public class KraberItemModel extends GeoModel<Kraber> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.1f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -58,6 +58,7 @@ public class M4ItemModel extends GeoModel<M4Item> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -98,6 +98,7 @@ public class M60ItemModel extends GeoModel<M60Item> {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -68,6 +68,7 @@ public class M79ItemModel extends GeoModel<M79Item> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.1f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -68,6 +68,7 @@ public class M870ItemModel extends GeoModel<M870Item> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.12f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -42,6 +42,7 @@ public class M98bItemModel extends GeoModel<M98bItem> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.12f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -52,6 +52,7 @@ public class MinigunItemModel extends GeoModel<Minigun> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -72,6 +72,7 @@ public class Mk14ItemModel extends GeoModel<Mk14Item> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(2.8f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -49,6 +49,7 @@ public class RpgItemModel extends GeoModel<RpgItem> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -89,6 +89,7 @@ public class RpkItemModel extends GeoModel<RpkItem> {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.2f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -85,6 +85,7 @@ public class SentinelItemModel extends GeoModel<SentinelItem> {
shen.setPosY(0.4f * (float) (fp + 2 * fr));
shen.setPosZ(3.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.12f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.025f * (float) fr);
} else {

View file

@ -74,6 +74,7 @@ public class SksItemModel extends GeoModel<SksItem> {
shen.setPosY(-0.01f * (float) (fp + 2 * fr));
shen.setPosZ(0.8f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -97,6 +97,7 @@ public class SvdItemModel extends GeoModel<SvdItem> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(1.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -39,6 +39,7 @@ public class TaserItemModel extends GeoModel<Taser> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(0.5f * (float) (fp + 0.54f * fr));
shen.setRotX(0.02f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.0025f * (float) fr);
} else {

View file

@ -73,6 +73,7 @@ public class VectorItemModel extends GeoModel<VectorItem> {
shen.setPosY(0.02f * (float) (fp + 2 * fr));
shen.setPosZ(0.6f * (float) (fp + 0.54f * fr));
shen.setRotX(0.003f * (float) (fp + fr));
shen.setRotZ(0f);
if ((player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new TargetModVariables.PlayerVariables())).recoilHorizon > 0) {
shen.setRotY(0.015f * (float) fr);
} else {

View file

@ -424,6 +424,8 @@ public class ClientEventHandler {
(pose * (4.34 * Math.pow(data.getDouble("firetime"), 2) - 6.5 * data.getDouble("firetime") + 2.167 + data.getDouble("firepos2"))));
}
if (0 < data.getDouble("fire_rotx_time") && data.getDouble("fire_rotx_time") < 1.732) {
data.putDouble("fire_rotx_time", (data.getDouble("fire_rotx_time") + 0.12 * (1.9 - data.getDouble("fire_rotx_time")) * times));
}