Physics solver refactor (#3479)

This commit is contained in:
metalgearsloth
2022-12-26 10:51:00 +11:00
committed by GitHub
parent 27e0c22fe2
commit 5c1d753a8d
28 changed files with 2634 additions and 2642 deletions

View File

@@ -218,7 +218,6 @@ namespace Robust.UnitTesting.Server
container.Register<IPrototypeManager, PrototypeManager>();
container.Register<IComponentFactory, ComponentFactory>();
container.Register<IEntitySystemManager, EntitySystemManager>();
container.Register<IIslandManager, IslandManager>();
container.Register<IManifoldManager, CollisionManager>();
container.Register<IMapManagerInternal, MapManager>();
container.Register<IPhysicsManager, PhysicsManager>();

View File

@@ -63,13 +63,13 @@ public sealed class GridMovement_Test : RobustIntegrationTest
// Alright just a quick validation then we start the actual damn test.
var physicsMap = entManager.GetComponent<SharedPhysicsMapComponent>(mapManager.GetMapEntityId(mapId));
physicsMap.Step(0.001f, false);
physSystem.Step(physicsMap, 0.001f, false);
Assert.That(onGridBody.ContactCount, Is.EqualTo(0));
// Alright now move the grid on top of the off grid body, run physics for a frame and see if they contact
entManager.GetComponent<TransformComponent>(grid.Owner).LocalPosition = new Vector2(10f, 10f);
physicsMap.Step(0.001f, false);
physSystem.Step(physicsMap, 0.001f, false);
Assert.That(onGridBody.ContactCount, Is.EqualTo(1));
});