This commit is contained in:
Anuken 2020-11-11 14:55:16 -05:00
parent 988fdb0c9b
commit cf4f912cef
4 changed files with 5 additions and 7 deletions

View File

@ -69,8 +69,9 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
}
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
return isCommanding() ? minFormationSpeed * 0.98f : type.speed;
return (isCommanding() ? minFormationSpeed * 0.98f : type.speed) * strafePenalty;
}
/** @return speed with boost multipliers factored in. */

View File

@ -602,9 +602,7 @@ public class DesktopInput extends InputHandler{
boolean omni = unit.type.omniMovement;
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() * strafePenalty;
float speed = unit.realSpeed();
float xa = Core.input.axis(Binding.move_x);
float ya = Core.input.axis(Binding.move_y);
boolean boosted = (unit instanceof Mechc && unit.isFlying());

View File

@ -854,9 +854,8 @@ public class MobileInput extends InputHandler implements GestureListener{
targetPos.set(Core.camera.position);
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 bulletSpeed = unit.hasWeapons() ? type.weapons.first().bullet.speed : 0f;
float mouseAngle = unit.angleTo(unit.aimX(), unit.aimY());

View File

@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=2c022c5c2723b39e63da7cadd6c53ce6ec78f9d3
archash=a6f488d6f741b98d123113ceb26439032be0719e