mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-02 11:10:50 +03:00
misc fixes
This commit is contained in:
@@ -121,13 +121,9 @@ public class EntityCollisions{
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T extends Hitboxc> void updatePhysics(EntityGroup<T> group){
|
||||
var tree = group.tree();
|
||||
tree.clear();
|
||||
group.tree().fill(group.rawSeq());
|
||||
|
||||
group.each(s -> {
|
||||
s.updateLastPosition();
|
||||
tree.insert(s);
|
||||
});
|
||||
group.each(Hitboxc::updateLastPosition);
|
||||
}
|
||||
|
||||
public static boolean legsSolid(int x, int y){
|
||||
|
||||
@@ -217,6 +217,10 @@ public class EntityGroup<T extends Entityc> implements Iterable<T>{
|
||||
return tree;
|
||||
}
|
||||
|
||||
public Seq<T> rawSeq(){
|
||||
return array;
|
||||
}
|
||||
|
||||
/** Resizes the internal quadtree, if it is enabled.*/
|
||||
public void resize(float x, float y, float w, float h){
|
||||
if(tree != null){
|
||||
|
||||
@@ -887,10 +887,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
}
|
||||
|
||||
public void updateSelectQuadtree(){
|
||||
selectPlanTree.clear();
|
||||
for(var plan : selectPlans){
|
||||
selectPlanTree.insert(plan);
|
||||
}
|
||||
selectPlanTree.fill(selectPlans);
|
||||
}
|
||||
|
||||
/** Adds an input lock; if this function returns true, input is locked. Used for mod 'cutscenes' or custom camera panning. */
|
||||
@@ -1406,10 +1403,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
|
||||
plan.animScale = prev.animScale;
|
||||
}
|
||||
}
|
||||
player.previewPlanTree.clear();
|
||||
for(BuildPlan plan : plans){
|
||||
player.previewPlanTree.insert(plan);
|
||||
}
|
||||
player.previewPlanTree.fill(plans);
|
||||
}
|
||||
|
||||
BuildPlan current = player.isBuilder() ? player.unit().buildPlan() : null;
|
||||
|
||||
Reference in New Issue
Block a user