Fixed packet spam on sector capture

This commit is contained in:
Anuken
2024-10-06 10:05:51 -04:00
parent 20a0afd280
commit 304ad74084
6 changed files with 38 additions and 23 deletions

View File

@@ -755,6 +755,17 @@ public class Tile implements Position, QuadTreeObject, Displayable{
}
}
@Remote(called = Loc.server)
public static void setTeams(int[] positions, Team team){
if(positions == null) return;
for(int pos : positions){
Tile tile = world.tile(pos);
if(tile != null && tile.build != null){
tile.build.changeTeam(team);
}
}
}
@Remote(called = Loc.server)
public static void buildDestroyed(Building build){
if(build == null) return;