diff --git a/core/src/mindustry/ai/formations/patterns/CircleFormation.java b/core/src/mindustry/ai/formations/patterns/CircleFormation.java index 0988657adf..9636d97036 100644 --- a/core/src/mindustry/ai/formations/patterns/CircleFormation.java +++ b/core/src/mindustry/ai/formations/patterns/CircleFormation.java @@ -15,7 +15,7 @@ public class CircleFormation extends FormationPattern{ float radius = spacing / (float)Math.sin(180f / slots * Mathf.degRad); outLocation.set(Angles.trnsx(angle, radius), Angles.trnsy(angle, radius), angle); }else{ - outLocation.set(0, 0, 360f * slotNumber); + outLocation.set(0, spacing * 1.1f, 360f * slotNumber); } outLocation.z += angleOffset; diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 65105e30fa..fff3801c29 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1527,9 +1527,9 @@ public class Blocks implements ContentList{ hasPower = true; size = 2; - force = 4.5f; + force = 5f; scaledForce = 5.5f; - range = 110f; + range = 160f; damage = 0.4f; health = 160 * size * size; rotateSpeed = 10; diff --git a/core/src/mindustry/entities/comp/BuildingComp.java b/core/src/mindustry/entities/comp/BuildingComp.java index aee2464d9e..6cc6827424 100644 --- a/core/src/mindustry/entities/comp/BuildingComp.java +++ b/core/src/mindustry/entities/comp/BuildingComp.java @@ -53,7 +53,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, transient Block block; transient Seq proximity = new Seq<>(8); transient boolean updateFlow; - transient byte dump; + transient byte cdump; transient int rotation; transient boolean enabled = true; transient float enabledControlTime; @@ -443,7 +443,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, public boolean dumpPayload(Payload todump){ if(proximity.size == 0) return false; - int dump = this.dump; + int dump = this.cdump; for(int i = 0; i < proximity.size; i++){ Building other = proximity.get((i + dump) % proximity.size); @@ -477,7 +477,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, } public void dumpLiquid(Liquid liquid){ - int dump = this.dump; + int dump = this.cdump; for(int i = 0; i < proximity.size; i++){ incrementDump(proximity.size); @@ -577,7 +577,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, * containers, it gets added to the block's inventory. */ public void offload(Item item){ - int dump = this.dump; + int dump = this.cdump; for(int i = 0; i < proximity.size; i++){ incrementDump(proximity.size); @@ -595,7 +595,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, * Tries to put this item into a nearby container. Returns success. Unlike #offload(), this method does not change the block inventory. */ public boolean put(Item item){ - int dump = this.dump; + int dump = this.cdump; for(int i = 0; i < proximity.size; i++){ incrementDump(proximity.size); @@ -621,7 +621,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, public boolean dump(Item todump){ if(!block.hasItems || items.total() == 0 || (todump != null && !items.has(todump))) return false; - int dump = this.dump; + int dump = this.cdump; if(proximity.size == 0) return false; @@ -656,7 +656,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc, } public void incrementDump(int prox){ - dump = (byte)((dump + 1) % prox); + cdump = (byte)((cdump + 1) % prox); } /** Used for dumping items. */ diff --git a/core/src/mindustry/entities/comp/PlayerComp.java b/core/src/mindustry/entities/comp/PlayerComp.java index 1e4a88a640..4ee481b032 100644 --- a/core/src/mindustry/entities/comp/PlayerComp.java +++ b/core/src/mindustry/entities/comp/PlayerComp.java @@ -188,6 +188,11 @@ abstract class PlayerComp implements UnitController, Entityc, Syncc, Timerc, Dra if(unit.isRemote()){ unit.snapInterpolation(); } + + //reset selected block when switching units + if(!headless && isLocal()){ + control.input.block = null; + } } Events.fire(new UnitChangeEvent(self(), unit));