Fetch instruction
This commit is contained in:
@@ -150,6 +150,7 @@ public class Teams{
|
||||
data.presentFlag = false;
|
||||
data.unitCount = 0;
|
||||
data.units.clear();
|
||||
data.players.clear();
|
||||
if(data.tree != null){
|
||||
data.tree.clear();
|
||||
}
|
||||
@@ -195,6 +196,10 @@ public class Teams{
|
||||
count(unit);
|
||||
}
|
||||
|
||||
for(var player : Groups.player){
|
||||
player.team().data().players.add(player);
|
||||
}
|
||||
|
||||
//update presence of each team.
|
||||
for(Team team : Team.all){
|
||||
TeamData data = team.data();
|
||||
@@ -251,6 +256,8 @@ public class Teams{
|
||||
public @Nullable QuadTree<Unit> tree;
|
||||
/** Units of this team. Updated each frame. */
|
||||
public Seq<Unit> units = new Seq<>();
|
||||
/** Same as units, but players. */
|
||||
public Seq<Player> players = new Seq<>();
|
||||
/** Units of this team by type. Updated each frame. */
|
||||
public @Nullable Seq<Unit>[] unitsByType;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user