This commit is contained in:
Anuken
2020-04-16 11:30:42 -04:00
parent a8f4df8030
commit 713dbccf74
10 changed files with 304 additions and 36 deletions

View File

@@ -929,16 +929,21 @@ abstract class TileComp implements Posc, Teamc, Healthc, Tilec, Timerc, QuadTree
public void removeFromProximity(){
onProximityRemoved();
tmpTiles.clear();
Point2[] nearby = Edges.getEdges(block.size);
for(Point2 point : nearby){
Tilec other = world.ent(tile.x + point.x, tile.y + point.y);
//remove this tile from all nearby tile's proximities
if(other != null){
other.onProximityUpdate();
other.proximity().remove(this, true);
tmpTiles.add(other);
}
}
for(Tilec other : tmpTiles){
other.proximity().remove(this, true);
other.onProximityUpdate();
}
}
public void updateProximity(){