This commit is contained in:
Anuken
2020-11-29 19:41:10 -05:00
parent ba9bc472e8
commit c41dfa46aa
5 changed files with 10 additions and 8 deletions

View File

@@ -629,8 +629,8 @@ public class DesktopInput extends InputHandler{
unit.moveAt(movement);
}else{
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
if(!movement.isZero() && ground){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed);
if(!movement.isZero()){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed * Math.max(Time.delta, 1));
}
}

View File

@@ -836,7 +836,7 @@ public class MobileInput extends InputHandler implements GestureListener{
if(type == null) return;
boolean omni = unit.type.omniMovement;
boolean legs = unit.isGrounded();
boolean ground = unit.isGrounded();
boolean allowHealing = type.canHeal;
boolean validHealTarget = allowHealing && target instanceof Building && ((Building)target).isValid() && target.team() == unit.team &&
((Building)target).damaged() && target.within(unit, type.range);
@@ -908,8 +908,8 @@ public class MobileInput extends InputHandler implements GestureListener{
unit.moveAt(movement);
}else{
unit.moveAt(Tmp.v2.trns(unit.rotation, movement.len()));
if(!movement.isZero() && legs){
unit.vel.rotateTo(movement.angle(), type.rotateSpeed);
if(!movement.isZero()){
unit.vel.rotateTo(movement.angle(), unit.type.rotateSpeed * Math.max(Time.delta, 1));
}
}