Remove PhysShapeGrid (#4264)
This commit is contained in:
@@ -83,18 +83,7 @@ namespace Content.Server.Physics.Controllers
|
|||||||
|
|
||||||
if (!_mapManager.TryGetGrid(gridId, out var grid) || !EntityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) return;
|
if (!_mapManager.TryGetGrid(gridId, out var grid) || !EntityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) return;
|
||||||
|
|
||||||
//TODO: Switch to shuttle component
|
// This is on shuttle branch trust me
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void HandleFootsteps(IMoverComponent mover, IMobMoverComponent mobMover)
|
protected override void HandleFootsteps(IMoverComponent mover, IMobMoverComponent mobMover)
|
||||||
|
|||||||
@@ -88,9 +88,4 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape:
|
|
||||||
!type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
|
|
||||||
|
|||||||
@@ -79,8 +79,4 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- !type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
|
|
||||||
|
|||||||
@@ -98,9 +98,4 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape:
|
|
||||||
!type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape: !type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
- tiles:
|
- tiles:
|
||||||
-1,-1: 0
|
-1,-1: 0
|
||||||
0,-1: 0
|
0,-1: 0
|
||||||
|
|||||||
@@ -47,9 +47,4 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape:
|
|
||||||
!type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -77,11 +77,6 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape:
|
|
||||||
!type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
- uniqueMixes:
|
- uniqueMixes:
|
||||||
- volume: 2500
|
- volume: 2500
|
||||||
moles:
|
moles:
|
||||||
|
|||||||
@@ -8285,10 +8285,6 @@ entities:
|
|||||||
type: Transform
|
type: Transform
|
||||||
- index: 0
|
- index: 0
|
||||||
type: MapGrid
|
type: MapGrid
|
||||||
- fixtures:
|
|
||||||
- shape: !type:PhysShapeGrid
|
|
||||||
grid: 0
|
|
||||||
type: Physics
|
|
||||||
- tiles:
|
- tiles:
|
||||||
-16,-16: 0
|
-16,-16: 0
|
||||||
-16,-15: 0
|
-16,-15: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user