Multiplayer bugfixes

This commit is contained in:
Anuken
2020-07-09 13:13:57 -04:00
parent 29e9d064df
commit 2584197a02
24 changed files with 139 additions and 70 deletions

View File

@@ -3,6 +3,7 @@ package mindustry.entities;
import arc.func.*;
import arc.math.geom.*;
import mindustry.annotations.Annotations.*;
import mindustry.content.*;
import mindustry.game.*;
import mindustry.gen.*;
import mindustry.world.*;
@@ -21,6 +22,12 @@ public class Units{
unit.killed();
}
@Remote(called = Loc.server)
public static void unitDespawn(Unit unit){
Fx.unitDespawn.at(unit.x, unit.y, 0, unit);
unit.remove();
}
/** @return whether a new instance of a unit of this team can be created. */
public static boolean canCreate(Team team){
return teamIndex.count(team) < getCap(team);