Fixed block plans not being deleted locally
This commit is contained in:
@@ -888,10 +888,14 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
|||||||
removed.clear();
|
removed.clear();
|
||||||
|
|
||||||
//remove blocks to rebuild
|
//remove blocks to rebuild
|
||||||
for(BlockPlan req : player.team().data().blocks){
|
Iterator<BlockPlan> broken = player.team().data().blocks.iterator();
|
||||||
|
while(broken.hasNext()){
|
||||||
|
BlockPlan req = broken.next();
|
||||||
Block block = content.block(req.block);
|
Block block = content.block(req.block);
|
||||||
if(block.bounds(req.x, req.y, Tmp.r2).overlaps(Tmp.r1)){
|
if(block.bounds(req.x, req.y, Tmp.r2).overlaps(Tmp.r1)){
|
||||||
removed.add(Point2.pack(req.x, req.y));
|
removed.add(Point2.pack(req.x, req.y));
|
||||||
|
req.removed = true;
|
||||||
|
broken.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user