forked from SteamWar/SteamWar
Remove the breathe wing motion
Wings keep the flap motions only; saved breathing wings load as none.
This commit is contained in:
@@ -33,7 +33,6 @@ public class Wing extends DelegatingParticleElement {
|
||||
NONE,
|
||||
FLAP_SLOW,
|
||||
FLAP_FAST,
|
||||
BREATHE,
|
||||
}
|
||||
|
||||
// Wings stand slightly open when idle and open further the faster the player moves
|
||||
@@ -41,7 +40,6 @@ public class Wing extends DelegatingParticleElement {
|
||||
private static final double MOVING_OPEN_DEGREES = 15;
|
||||
private static final double FULL_OPEN_SPEED = 0.6;
|
||||
private static final double FLAP_DEGREES = 25;
|
||||
private static final double BREATHE_SCALE = 0.08;
|
||||
|
||||
private double size;
|
||||
private WingDesign wingDesign;
|
||||
@@ -73,7 +71,6 @@ public class Wing extends DelegatingParticleElement {
|
||||
double ticks = particleTickData.getDeg() * 10;
|
||||
double open = Math.toRadians(openDegrees(particleTickData, ticks));
|
||||
double cos = Math.cos(open), sin = Math.sin(open);
|
||||
double scale = size * (motion == Motion.BREATHE ? 1 + BREATHE_SCALE * Math.sin(2 * Math.PI * ticks / 40) : 1);
|
||||
double sneak = particleTickData.getPlayer().isSneaking() ? 0.5 : 0;
|
||||
|
||||
BodyFrame frame = particleTickData.getFrame();
|
||||
@@ -82,16 +79,16 @@ public class Wing extends DelegatingParticleElement {
|
||||
Location base = particleTickData.getLocation();
|
||||
for (Vector dVector : wingDesign.getVectors()) {
|
||||
if (hidden()) continue;
|
||||
double out = dVector.getX() * scale;
|
||||
Vector local = frame.local(out * cos, 0.6 + dVector.getY() * scale - sneak, -0.5 - Math.abs(out) * sin);
|
||||
double out = dVector.getX() * size;
|
||||
Vector local = frame.local(out * cos, 0.6 + dVector.getY() * size - sneak, -0.5 - Math.abs(out) * sin);
|
||||
particleElement.tick(shaded(particleTickData, dVector).withLocation(base.clone().add(local)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
for (Vector dVector : wingDesign.getVectors()) {
|
||||
if (hidden()) continue;
|
||||
double out = dVector.getX() * scale;
|
||||
Vector vector = new Vector(out * cos, 0.6 + dVector.getY() * scale - sneak, 0.5 + Math.abs(out) * sin);
|
||||
double out = dVector.getX() * size;
|
||||
Vector vector = new Vector(out * cos, 0.6 + dVector.getY() * size - sneak, 0.5 + Math.abs(out) * sin);
|
||||
vector.rotateAroundY(Math.toRadians(BodyMotion.yaw(particleTickData.getPlayer()) * -1));
|
||||
vector.setX(-vector.getX());
|
||||
vector.setZ(-vector.getZ());
|
||||
|
||||
Reference in New Issue
Block a user