This commit is contained in:
Anuken
2022-05-08 12:54:36 -04:00
parent d28a839f55
commit 02bbc10f40
2 changed files with 3 additions and 3 deletions

View File

@@ -129,7 +129,7 @@ abstract class LegsComp implements Posc, Rotc, Hitboxc, Flyingc, Unitc{
int div = Math.max(legs.length / type.legGroupSize, 2);
moveSpace = legLength / 1.6f / (div / 2f) * type.legMoveSpace;
//TODO should move legs even when still, based on speed. also, to prevent "slipping", make sure legs move when they are too far from their destination
totalLength += type.legContinuousMove ? type.speed * speedMultiplier : Mathf.dst(deltaX(), deltaY());
totalLength += type.legContinuousMove ? type.speed * speedMultiplier * Time.delta : Mathf.dst(deltaX(), deltaY());
float trns = moveSpace * 0.85f * type.legForwardScl;

View File

@@ -742,8 +742,8 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
Unit unit = selectedCommandUnit(input.mouseWorldX(), input.mouseWorldY());
Building build = world.buildWorld(input.mouseWorldX(), input.mouseWorldY());
if(unit != null){
if(selectedUnits.contains(unit)){
selectedUnits.remove(unit);
if(!selectedUnits.contains(unit)){
selectedUnits.add(unit);
}else{
selectedUnits.clear();
selectedUnits.add(unit);