WIP grouped unit arrival

This commit is contained in:
Anuken
2023-09-24 07:44:42 -04:00
parent 276245bf3c
commit 2aab745603
9 changed files with 566 additions and 60 deletions

View File

@@ -10,11 +10,11 @@ import mindustry.entities.*;
import mindustry.gen.*;
public class PhysicsProcess implements AsyncProcess{
private static final int
layers = 3,
layerGround = 0,
layerLegs = 1,
layerFlying = 2;
public static final int
layers = 3,
layerGround = 0,
layerLegs = 1,
layerFlying = 2;
private PhysicsWorld physics;
private Seq<PhysicRef> refs = new Seq<>(false);
@@ -58,9 +58,7 @@ public class PhysicsProcess implements AsyncProcess{
//save last position
PhysicRef ref = entity.physref;
ref.body.layer =
entity.type.allowLegStep && entity.type.legPhysicsLayer ? layerLegs :
entity.isGrounded() ? layerGround : layerFlying;
ref.body.layer = entity.collisionLayer();
ref.x = entity.x;
ref.y = entity.y;
ref.body.local = local || entity.isLocal();