diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 64a717d75e..7d8df00b89 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -53,7 +53,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I } public void approach(Vec2 vector){ - vel.approachDelta(vector, type.accel * realSpeed() * floorSpeedMultiplier()); + vel.approachDelta(vector, type.accel * realSpeed()); } public void aimLook(Position pos){ @@ -82,7 +82,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I /** @return speed with boost multipliers factored in. */ public float realSpeed(){ - return Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation) * speed(); + return Mathf.lerp(1f, type.canBoost ? type.boostMultiplier : 1f, elevation) * speed() * floorSpeedMultiplier(); } /** Iterates through this unit and everything it is controlling. */ diff --git a/core/src/mindustry/type/UnitType.java b/core/src/mindustry/type/UnitType.java index 19a06c3196..d2b38efe2c 100644 --- a/core/src/mindustry/type/UnitType.java +++ b/core/src/mindustry/type/UnitType.java @@ -292,6 +292,7 @@ public class UnitType extends UnlockableContent{ if(maxRange < 0){ maxRange = 0f; + maxRange = Math.max(maxRange, range); for(Weapon weapon : weapons){ maxRange = Math.max(maxRange, weapon.bullet.range() + hitSize / 2f); diff --git a/core/src/mindustry/world/blocks/distribution/Conveyor.java b/core/src/mindustry/world/blocks/distribution/Conveyor.java index 9db976e8a5..8b0a7d45eb 100644 --- a/core/src/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/mindustry/world/blocks/distribution/Conveyor.java @@ -83,7 +83,7 @@ public class Conveyor extends Block implements Autotiler{ @Override public Block getReplacement(BuildPlan req, Seq requests){ - Boolf cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && o.rotation == req.rotation && (req.block instanceof Conveyor || req.block instanceof Junction)); + Boolf cont = p -> requests.contains(o -> o.x == req.x + p.x && o.y == req.y + p.y && (req.block instanceof Conveyor || req.block instanceof Junction)); return cont.get(Geometry.d4(req.rotation)) && cont.get(Geometry.d4(req.rotation - 2)) && req.tile() != null && diff --git a/desktop/src/mindustry/desktop/DesktopLauncher.java b/desktop/src/mindustry/desktop/DesktopLauncher.java index 99120a74df..8b9d0a7487 100644 --- a/desktop/src/mindustry/desktop/DesktopLauncher.java +++ b/desktop/src/mindustry/desktop/DesktopLauncher.java @@ -109,7 +109,7 @@ public class DesktopLauncher extends ClientLauncher{ steamError = e; loadError = true; Log.err(e); - try(OutputStream s = new FileOutputStream(new File("steam-error-log-" + System.nanoTime() + ".txt"))){ + try(OutputStream s = new FileOutputStream("steam-error-log-" + System.nanoTime() + ".txt")){ String log = Strings.neatError(e); s.write(log.getBytes()); }catch(Exception e2){