This commit is contained in:
Anuken
2020-09-06 09:41:48 -04:00
parent 50a94af0d1
commit e5674b1b1e
2 changed files with 10 additions and 4 deletions

View File

@@ -29,8 +29,16 @@ abstract class BulletComp implements Timedc, Damagec, Hitboxc, Teamc, Posc, Draw
@Override
public void getCollisions(Cons<QuadTree> consumer){
for(Team team : team.enemies()){
consumer.get(teamIndex.tree(team));
if(team.active()){
for(Team team : team.enemies()){
consumer.get(teamIndex.tree(team));
}
}else{
for(Team other : Team.all){
if(other != team && teamIndex.count(other) > 0){
consumer.get(teamIndex.tree(other));
}
}
}
}