mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Physics solver refactor (#3479)
This commit is contained in:
@@ -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>();
|
||||
|
||||
@@ -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));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user