This commit is contained in:
Anuken
2021-07-15 20:08:05 -04:00
parent 3f7dc66ac0
commit b0d4607798
4 changed files with 13 additions and 8 deletions
+2 -4
View File
@@ -145,6 +145,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
for(int pos : positions){
if(req.x == Point2.x(pos) && req.y == Point2.y(pos)){
req.removed = true;
it.remove();
continue outer;
}
@@ -887,13 +888,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
removed.clear();
//remove blocks to rebuild
Iterator<BlockPlan> broken = player.team().data().blocks.iterator();
while(broken.hasNext()){
BlockPlan req = broken.next();
for(BlockPlan req : player.team().data().blocks){
Block block = content.block(req.block);
if(block.bounds(req.x, req.y, Tmp.r2).overlaps(Tmp.r1)){
removed.add(Point2.pack(req.x, req.y));
broken.remove();
}
}