Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
xzxADIxzx committed Sep 25, 2021
1 parent d5771eb commit 96b1200
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/input/DesktopInput512.java
Original file line number Diff line number Diff line change
Expand Up @@ -670,12 +670,12 @@ protected void updateMovement(Unit unit){
boolean boosted = (unit instanceof Mechc && unit.isFlying());

movement.set(xa, ya).nor().scl(speed);
if(Core.input.keyDown(Binding.mouse_move) || Core.input.keyDown(ModBinding.look_at)){
if(Core.input.keyDown(Binding.mouse_move)){
movement.add(input.mouseWorld().sub(player).scl(1f / 25f * speed)).limit(speed);
}

float mouseAngle = Angles.mouseAngle(unit.x, unit.y);
boolean aimCursor = omni && player.shooting && unit.type.hasWeapons() && unit.type.faceTarget && !boosted && unit.type.rotateShooting;
boolean aimCursor = omni && (player.shooting || Core.input.keyDown(ModBinding.look_at)) && unit.type.hasWeapons() && unit.type.faceTarget && !boosted && unit.type.rotateShooting;

if(aimCursor){
unit.lookAt(mouseAngle);
Expand Down

0 comments on commit 96b1200

Please sign in to comment.