1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-11-10 15:05:23 +03:00
This commit is contained in:
Anuken 2020-10-28 14:05:09 -04:00
parent e92d26b9e8
commit 68ab48a1d3
5 changed files with 9 additions and 7 deletions

View File

@ -1543,10 +1543,10 @@ public class Blocks implements ContentList{
hasPower = true; hasPower = true;
size = 2; size = 2;
force = 5f; force = 7f;
scaledForce = 5.5f; scaledForce = 7f;
range = 160f; range = 220f;
damage = 0.4f; damage = 0.3f;
health = 160 * size * size; health = 160 * size * size;
rotateSpeed = 10; rotateSpeed = 10;

View File

@ -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){ public static void setPosition(float x, float y){
player.unit().set(x, y); player.unit().set(x, y);
player.set(x, y); player.set(x, y);

View File

@ -137,7 +137,7 @@ public class MapEditor{
if(isFloor){ if(isFloor){
tile.setFloor(drawBlock.asFloor()); tile.setFloor(drawBlock.asFloor());
}else{ }else if(!(tile.block().isMultiblock() && !drawBlock.isMultiblock())){
if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){ if(drawBlock.rotate && tile.build != null && tile.build.rotation != rotation){
addTileOp(TileOp.get(tile.x, tile.y, (byte)OpType.rotation.ordinal(), (byte)rotation)); addTileOp(TileOp.get(tile.x, tile.y, (byte)OpType.rotation.ordinal(), (byte)rotation));
} }

View File

@ -237,12 +237,14 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
@Override @Override
public void add(){ public void add(){
team.data().updateCount(type, 1);
//check if over unit cap //check if over unit cap
if(count() > cap() && !spawnedByCore && !dead){ if(count() > cap() && !spawnedByCore && !dead){
Call.unitCapDeath(self()); Call.unitCapDeath(self());
team.data().updateCount(type, -1); team.data().updateCount(type, -1);
} }
} }
@Override @Override

View File

@ -265,7 +265,7 @@ public class Teams{
if(typeCounts == null || typeCounts.length <= type.id){ if(typeCounts == null || typeCounts.length <= type.id){
typeCounts = new int[Vars.content.units().size]; 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<Unit> tree(){ public QuadTree<Unit> tree(){