mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 19:39:04 +07:00
Cleanup
This commit is contained in:
parent
988fdb0c9b
commit
cf4f912cef
@ -69,8 +69,9 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||||||
}
|
}
|
||||||
|
|
||||||
public float speed(){
|
public float speed(){
|
||||||
|
float strafePenalty = isGrounded() || !isPlayer() ? 1f : Mathf.lerp(1f, type.strafePenalty, Angles.angleDist(vel().angle(), rotation) / 180f);
|
||||||
//limit speed to minimum formation speed to preserve formation
|
//limit speed to minimum formation speed to preserve formation
|
||||||
return isCommanding() ? minFormationSpeed * 0.98f : type.speed;
|
return (isCommanding() ? minFormationSpeed * 0.98f : type.speed) * strafePenalty;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @return speed with boost multipliers factored in. */
|
/** @return speed with boost multipliers factored in. */
|
||||||
|
@ -602,9 +602,7 @@ public class DesktopInput extends InputHandler{
|
|||||||
boolean omni = unit.type.omniMovement;
|
boolean omni = unit.type.omniMovement;
|
||||||
boolean ground = unit.isGrounded();
|
boolean ground = unit.isGrounded();
|
||||||
|
|
||||||
float strafePenalty = ground ? 1f : Mathf.lerp(1f, unit.type.strafePenalty, Angles.angleDist(unit.vel().angle(), unit.rotation()) / 180f);
|
float speed = unit.realSpeed();
|
||||||
|
|
||||||
float speed = unit.realSpeed() * strafePenalty;
|
|
||||||
float xa = Core.input.axis(Binding.move_x);
|
float xa = Core.input.axis(Binding.move_x);
|
||||||
float ya = Core.input.axis(Binding.move_y);
|
float ya = Core.input.axis(Binding.move_y);
|
||||||
boolean boosted = (unit instanceof Mechc && unit.isFlying());
|
boolean boosted = (unit instanceof Mechc && unit.isFlying());
|
||||||
|
@ -854,9 +854,8 @@ public class MobileInput extends InputHandler implements GestureListener{
|
|||||||
|
|
||||||
targetPos.set(Core.camera.position);
|
targetPos.set(Core.camera.position);
|
||||||
float attractDst = 15f;
|
float attractDst = 15f;
|
||||||
float strafePenalty = legs ? 1f : Mathf.lerp(1f, type.strafePenalty, Angles.angleDist(unit.vel.angle(), unit.rotation) / 180f);
|
|
||||||
|
|
||||||
float speed = unit.realSpeed() * strafePenalty;
|
float speed = unit.realSpeed();
|
||||||
float range = unit.hasWeapons() ? unit.range() : 0f;
|
float range = unit.hasWeapons() ? unit.range() : 0f;
|
||||||
float bulletSpeed = unit.hasWeapons() ? type.weapons.first().bullet.speed : 0f;
|
float bulletSpeed = unit.hasWeapons() ? type.weapons.first().bullet.speed : 0f;
|
||||||
float mouseAngle = unit.angleTo(unit.aimX(), unit.aimY());
|
float mouseAngle = unit.angleTo(unit.aimX(), unit.aimY());
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=2c022c5c2723b39e63da7cadd6c53ce6ec78f9d3
|
archash=a6f488d6f741b98d123113ceb26439032be0719e
|
||||||
|
Loading…
Reference in New Issue
Block a user