Better support for disabling omniMovement

This commit is contained in:
Anuken
2021-08-19 16:29:49 -04:00
parent dc5ca76df0
commit e23054d606
8 changed files with 47 additions and 37 deletions

View File

@@ -642,11 +642,7 @@ public class DesktopInput extends InputHandler{
unit.lookAt(unit.prefRotation());
}
if(omni){
unit.moveAt(movement);
}else{
unit.rotateMove(movement);
}
unit.movePref(movement);
unit.aim(unit.type.faceTarget ? Core.input.mouseWorld() : Tmp.v1.trns(unit.rotation, Core.input.mouseWorld().dst(unit)).add(unit.x, unit.y));
unit.controlWeapons(true, player.shooting && !boosted);

View File

@@ -919,11 +919,7 @@ public class MobileInput extends InputHandler implements GestureListener{
player.boosting = collisions.overlapsTile(rect) || !unit.within(targetPos, 85f);
if(omni){
unit.moveAt(movement);
}else{
unit.rotateMove(movement);
}
unit.movePref(movement);
//update shooting if not building + not mining
if(!player.unit().activelyBuilding() && player.unit().mineTile == null){