Fixed wing scale and rotation not being applied

This commit is contained in:
Sollace 2023-03-22 04:00:34 +00:00
parent d82aeaa6c5
commit 45c9d34f5d

View file

@ -27,9 +27,20 @@ public class PonyWings<T extends Model & IPegasus> implements IPart, MsonModel {
@Override @Override
public void init(ModelView context) { public void init(ModelView context) {
pegasus = context.getModel(); pegasus = context.getModel();
float wingScale = context.getLocalValue("wing_scale", 1); // pegasi 1 / bats 1.3F
float walkingRotationSpeed = context.getLocalValue("walking_rotation_speed", 0.15F); // pegasi 0.15 / bats 0.05F
leftWing = context.findByName("left_wing"); leftWing = context.findByName("left_wing");
rightWing = context.findByName("right_wing"); rightWing = context.findByName("right_wing");
legacyWing = context.findByName("legacy_right_wing"); legacyWing = context.findByName("legacy_right_wing");
leftWing.wingScale = wingScale;
leftWing.walkingRotationSpeed = walkingRotationSpeed;
rightWing.wingScale = wingScale;
rightWing.walkingRotationSpeed = walkingRotationSpeed;
legacyWing.wingScale = wingScale;
legacyWing.walkingRotationSpeed = walkingRotationSpeed;
} }
public Wing getLeft() { public Wing getLeft() {
@ -92,8 +103,8 @@ public class PonyWings<T extends Model & IPegasus> implements IPart, MsonModel {
protected final ModelPart extended; protected final ModelPart extended;
protected final ModelPart folded; protected final ModelPart folded;
private float wingScale; private float wingScale = 1;
private float walkingRotationSpeed; private float walkingRotationSpeed = 0.15F;
public Wing(ModelPart tree) { public Wing(ModelPart tree) {
extended = tree.getChild("extended"); extended = tree.getChild("extended");
@ -103,8 +114,6 @@ public class PonyWings<T extends Model & IPegasus> implements IPart, MsonModel {
@Override @Override
public void init(ModelView context) { public void init(ModelView context) {
pegasus = context.getModel(); pegasus = context.getModel();
wingScale = context.getLocalValue("wing_scale", 1); // pegasi 1 / bats 1.3F
walkingRotationSpeed = context.getLocalValue("walking_rotation_speed", 0.15F); // pegasi 0.15 / bats 0.05F
} }
public void rotateWalking(float swing) { public void rotateWalking(float swing) {