From 68ab48a1d387ee673ae425ff915f84be24ac4c52 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 28 Oct 2020 14:05:09 -0400 Subject: [PATCH] Fixed #3170 --- core/src/mindustry/content/Blocks.java | 8 ++++---- core/src/mindustry/core/NetClient.java | 2 +- core/src/mindustry/editor/MapEditor.java | 2 +- core/src/mindustry/entities/comp/UnitComp.java | 2 ++ core/src/mindustry/game/Teams.java | 2 +- 5 files changed, 9 insertions(+), 7 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 24cf0788ad..7bc5c25761 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -1543,10 +1543,10 @@ public class Blocks implements ContentList{ hasPower = true; size = 2; - force = 5f; - scaledForce = 5.5f; - range = 160f; - damage = 0.4f; + force = 7f; + scaledForce = 7f; + range = 220f; + damage = 0.3f; health = 160 * size * size; rotateSpeed = 10; diff --git a/core/src/mindustry/core/NetClient.java b/core/src/mindustry/core/NetClient.java index 13dc4c1221..5715edc5e6 100644 --- a/core/src/mindustry/core/NetClient.java +++ b/core/src/mindustry/core/NetClient.java @@ -363,7 +363,7 @@ public class NetClient implements ApplicationListener{ }); } - @Remote(variants = Variant.one) + @Remote(variants = Variant.one, called = Loc.server) public static void setPosition(float x, float y){ player.unit().set(x, y); player.set(x, y); diff --git a/core/src/mindustry/editor/MapEditor.java b/core/src/mindustry/editor/MapEditor.java index 7a2cc11bfb..c460d7c042 100644 --- a/core/src/mindustry/editor/MapEditor.java +++ b/core/src/mindustry/editor/MapEditor.java @@ -137,7 +137,7 @@ public class MapEditor{ if(isFloor){ tile.setFloor(drawBlock.asFloor()); - }else{ + }else if(!(tile.block().isMultiblock() && !drawBlock.isMultiblock())){ if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){ addTileOp(TileOp.get(tile.x, tile.y, (byte)OpType.rotation.ordinal(), (byte)rotation)); } diff --git a/core/src/mindustry/entities/comp/UnitComp.java b/core/src/mindustry/entities/comp/UnitComp.java index 11efcf9948..3cba913fbb 100644 --- a/core/src/mindustry/entities/comp/UnitComp.java +++ b/core/src/mindustry/entities/comp/UnitComp.java @@ -237,12 +237,14 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I @Override public void add(){ + team.data().updateCount(type, 1); //check if over unit cap if(count() > cap() && !spawnedByCore && !dead){ Call.unitCapDeath(self()); team.data().updateCount(type, -1); } + } @Override diff --git a/core/src/mindustry/game/Teams.java b/core/src/mindustry/game/Teams.java index 6a2972f074..a745d40029 100644 --- a/core/src/mindustry/game/Teams.java +++ b/core/src/mindustry/game/Teams.java @@ -265,7 +265,7 @@ public class Teams{ if(typeCounts == null || typeCounts.length <= type.id){ typeCounts = new int[Vars.content.units().size]; } - typeCounts [type.id] = Math.max(amount + typeCounts [type.id], 0); + typeCounts[type.id] = Math.max(amount + typeCounts [type.id], 0); } public QuadTree tree(){