Remove PhysShapeGrid (#4264)

This commit is contained in:
metalgearsloth
2021-07-14 18:48:07 +10:00
committed by GitHub
parent 6867cc9c9f
commit e726e88f7a
8 changed files with 1 additions and 44 deletions

View File

@@ -83,18 +83,7 @@ namespace Content.Server.Physics.Controllers
if (!_mapManager.TryGetGrid(gridId, out var grid) || !EntityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) return;
//TODO: Switch to shuttle component
if (!gridEntity.TryGetComponent(out PhysicsComponent? physics))
{
physics = gridEntity.AddComponent<PhysicsComponent>();
physics.BodyStatus = BodyStatus.InAir;
physics.CanCollide = true;
physics.AddFixture(new Fixture(physics, new PhysShapeGrid(grid)));
}
// TODO: Uhh this probably doesn't work but I still need to rip out the entity tree and make RenderingTreeSystem use grids so I'm not overly concerned about breaking shuttles.
physics.ApplyForce(mover.VelocityDir.walking + mover.VelocityDir.sprinting);
mover.VelocityDir = (Vector2.Zero, Vector2.Zero);
// This is on shuttle branch trust me
}
protected override void HandleFootsteps(IMoverComponent mover, IMobMoverComponent mobMover)

View File

@@ -88,9 +88,4 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape:
!type:PhysShapeGrid
grid: 0
type: Physics

View File

@@ -79,8 +79,4 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- !type:PhysShapeGrid
grid: 0
type: Physics

View File

@@ -98,9 +98,4 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape:
!type:PhysShapeGrid
grid: 0
type: Physics

View File

@@ -58,10 +58,6 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape: !type:PhysShapeGrid
grid: 0
type: Physics
- tiles:
-1,-1: 0
0,-1: 0

View File

@@ -47,9 +47,4 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape:
!type:PhysShapeGrid
grid: 0
type: Physics
...

View File

@@ -77,11 +77,6 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape:
!type:PhysShapeGrid
grid: 0
type: Physics
- uniqueMixes:
- volume: 2500
moles:

View File

@@ -8285,10 +8285,6 @@ entities:
type: Transform
- index: 0
type: MapGrid
- fixtures:
- shape: !type:PhysShapeGrid
grid: 0
type: Physics
- tiles:
-16,-16: 0
-16,-15: 0