Content update for ECS physics (#13291)

This commit is contained in:
metalgearsloth
2023-01-15 15:38:59 +11:00
committed by GitHub
parent 46d24bc36b
commit bf79d76666
61 changed files with 431 additions and 379 deletions

View File

@@ -262,17 +262,8 @@ namespace Content.Server.Shuttles.Systems
component.BurnPoly.Count > 0)
{
var shape = new PolygonShape();
shape.SetVertices(component.BurnPoly);
var fixture = new Fixture(physicsComponent, shape)
{
ID = BurnFixture,
Hard = false,
CollisionLayer = (int) CollisionGroup.FullTileMask
};
_fixtureSystem.TryCreateFixture(physicsComponent, fixture);
_fixtureSystem.TryCreateFixture(uid, shape, BurnFixture, hard: false, collisionLayer: (int) CollisionGroup.FullTileMask);
}
break;
@@ -352,7 +343,7 @@ namespace Content.Server.Shuttles.Systems
if (EntityManager.TryGetComponent(uid, out PhysicsComponent? physicsComponent))
{
_fixtureSystem.DestroyFixture(physicsComponent, BurnFixture);
_fixtureSystem.DestroyFixture(uid, BurnFixture, body: physicsComponent);
}
_activeThrusters.Remove(component);