diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 0859605240..b2f81d5526 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -90,8 +90,8 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I public float prefRotation(){ if(activelyBuilding()){ return angleTo(buildPlan()); - }else if(mineTile() != null){ - return angleTo(mineTile()); + }else if(mineTile != null){ + return angleTo(mineTile); }else if(moving()){ return vel().angle(); } diff --git a/core/src/mindustry/graphics/g3d/PlanetRenderer.java b/core/src/mindustry/graphics/g3d/PlanetRenderer.java index 46fcef4edf..95a2abd9e7 100644 --- a/core/src/mindustry/graphics/g3d/PlanetRenderer.java +++ b/core/src/mindustry/graphics/g3d/PlanetRenderer.java @@ -37,6 +37,7 @@ public class PlanetRenderer implements Disposable{ public final VertexBatch3D batch = new VertexBatch3D(20000, false, true, 0); public float zoom = 1f; + public float orbitAlpha = 1f; private final Mesh[] outlines = new Mesh[10]; public final PlaneBatch3D projector = new PlaneBatch3D(); @@ -168,7 +169,7 @@ public class PlanetRenderer implements Disposable{ Vec3 center = planet.parent.position; float radius = planet.orbitRadius; int points = (int)(radius * 10); - Angles.circleVectors(points, radius, (cx, cy) -> batch.vertex(Tmp.v32.set(center).add(cx, 0, cy), Pal.gray)); + Angles.circleVectors(points, radius, (cx, cy) -> batch.vertex(Tmp.v32.set(center).add(cx, 0, cy), Pal.gray.write(Tmp.c1).a(orbitAlpha))); batch.flush(Gl.lineLoop); } diff --git a/core/src/mindustry/input/DesktopInput.java b/core/src/mindustry/input/DesktopInput.java index ddc84131ba..ad0e6b32f9 100644 --- a/core/src/mindustry/input/DesktopInput.java +++ b/core/src/mindustry/input/DesktopInput.java @@ -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)); } } diff --git a/core/src/mindustry/input/MobileInput.java b/core/src/mindustry/input/MobileInput.java index b3b519609d..5d0284abf7 100644 --- a/core/src/mindustry/input/MobileInput.java +++ b/core/src/mindustry/input/MobileInput.java @@ -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)); } } diff --git a/core/src/mindustry/ui/dialogs/PlanetDialog.java b/core/src/mindustry/ui/dialogs/PlanetDialog.java index 94d525bce0..3db6350619 100644 --- a/core/src/mindustry/ui/dialogs/PlanetDialog.java +++ b/core/src/mindustry/ui/dialogs/PlanetDialog.java @@ -409,6 +409,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{ @Override public void draw(){ + planets.orbitAlpha = selectAlpha; planets.render(PlanetDialog.this); if(Core.scene.getDialog() == PlanetDialog.this){ Core.scene.setScrollFocus(PlanetDialog.this);