mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-27 16:09:57 +07:00
Fixed bizzare crash
This commit is contained in:
parent
c2c5836752
commit
01304bf734
@ -35,14 +35,14 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
|||||||
float finalPlaceDst = state.rules.infiniteResources ? Float.MAX_VALUE : placeDistance;
|
float finalPlaceDst = state.rules.infiniteResources ? Float.MAX_VALUE : placeDistance;
|
||||||
Unit unit = (Unit)this;
|
Unit unit = (Unit)this;
|
||||||
|
|
||||||
//remove already completed build requests
|
Iterator<BuildRequest> it = buildQueue().iterator();
|
||||||
removal.clear();
|
while(it.hasNext()){
|
||||||
removal.addAll(buildQueue());
|
BuildRequest req = it.next();
|
||||||
|
|
||||||
Structs.filter(buildQueue(), req -> {
|
|
||||||
Tile tile = world.tile(req.x, req.y);
|
Tile tile = world.tile(req.x, req.y);
|
||||||
return tile == null || (req.breaking && tile.block() == Blocks.air) || (!req.breaking && (tile.rotation() == req.rotation || !req.block.rotate) && tile.block() == req.block);
|
if(tile == null || (req.breaking && tile.block() == Blocks.air) || (!req.breaking && (tile.rotation() == req.rotation || !req.block.rotate) && tile.block() == req.block)){
|
||||||
});
|
it.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TileEntity core = unit.getClosestCore();
|
TileEntity core = unit.getClosestCore();
|
||||||
|
|
||||||
@ -230,7 +230,6 @@ public interface BuilderTrait extends Entity, TeamTrait{
|
|||||||
|
|
||||||
//due to iOS weirdness, this is apparently required
|
//due to iOS weirdness, this is apparently required
|
||||||
class BuildDataStatic{
|
class BuildDataStatic{
|
||||||
static Array<BuildRequest> removal = new Array<>();
|
|
||||||
static Vector2[] tmptr = new Vector2[]{new Vector2(), new Vector2(), new Vector2(), new Vector2()};
|
static Vector2[] tmptr = new Vector2[]{new Vector2(), new Vector2(), new Vector2(), new Vector2()};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user