Skip to content

Commit e726e88

Browse files
Remove PhysShapeGrid (space-wizards#4264)
1 parent 6867cc9 commit e726e88

File tree

8 files changed

+1
-44
lines changed

8 files changed

+1
-44
lines changed

Content.Server/Physics/Controllers/MoverController.cs

+1-12
Original file line numberDiff line numberDiff line change
@@ -83,18 +83,7 @@ private void HandleShuttleMovement(ShuttleControllerComponent mover)
8383

8484
if (!_mapManager.TryGetGrid(gridId, out var grid) || !EntityManager.TryGetEntity(grid.GridEntityId, out var gridEntity)) return;
8585

86-
//TODO: Switch to shuttle component
87-
if (!gridEntity.TryGetComponent(out PhysicsComponent? physics))
88-
{
89-
physics = gridEntity.AddComponent<PhysicsComponent>();
90-
physics.BodyStatus = BodyStatus.InAir;
91-
physics.CanCollide = true;
92-
physics.AddFixture(new Fixture(physics, new PhysShapeGrid(grid)));
93-
}
94-
95-
// 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.
96-
physics.ApplyForce(mover.VelocityDir.walking + mover.VelocityDir.sprinting);
97-
mover.VelocityDir = (Vector2.Zero, Vector2.Zero);
86+
// This is on shuttle branch trust me
9887
}
9988

10089
protected override void HandleFootsteps(IMoverComponent mover, IMobMoverComponent mobMover)

Content.Tools/test/0A.yml

-5
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,4 @@ entities:
8888
type: Transform
8989
- index: 0
9090
type: MapGrid
91-
- fixtures:
92-
- shape:
93-
!type:PhysShapeGrid
94-
grid: 0
95-
type: Physics
9691

Content.Tools/test/0B.yml

-4
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,4 @@ entities:
7979
type: Transform
8080
- index: 0
8181
type: MapGrid
82-
- fixtures:
83-
- !type:PhysShapeGrid
84-
grid: 0
85-
type: Physics
8682

Content.Tools/test/0C.yml

-5
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,4 @@ entities:
9898
type: Transform
9999
- index: 0
100100
type: MapGrid
101-
- fixtures:
102-
- shape:
103-
!type:PhysShapeGrid
104-
grid: 0
105-
type: Physics
106101

Resources/Maps/Test/Breathing/3by3-20oxy-80nit.yml

-4
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,6 @@ entities:
5858
type: Transform
5959
- index: 0
6060
type: MapGrid
61-
- fixtures:
62-
- shape: !type:PhysShapeGrid
63-
grid: 0
64-
type: Physics
6561
- tiles:
6662
-1,-1: 0
6763
0,-1: 0

Resources/Maps/Test/empty.yml

-5
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,4 @@ entities:
4747
type: Transform
4848
- index: 0
4949
type: MapGrid
50-
- fixtures:
51-
- shape:
52-
!type:PhysShapeGrid
53-
grid: 0
54-
type: Physics
5550
...

Resources/Maps/Test/singularity.yml

-5
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,6 @@ entities:
7777
type: Transform
7878
- index: 0
7979
type: MapGrid
80-
- fixtures:
81-
- shape:
82-
!type:PhysShapeGrid
83-
grid: 0
84-
type: Physics
8580
- uniqueMixes:
8681
- volume: 2500
8782
moles:

Resources/Maps/saltern.yml

-4
Original file line numberDiff line numberDiff line change
@@ -8285,10 +8285,6 @@ entities:
82858285
type: Transform
82868286
- index: 0
82878287
type: MapGrid
8288-
- fixtures:
8289-
- shape: !type:PhysShapeGrid
8290-
grid: 0
8291-
type: Physics
82928288
- tiles:
82938289
-16,-16: 0
82948290
-16,-15: 0

0 commit comments

Comments
 (0)