mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-02-15 03:30:53 +01:00
Fix warnings in Joints_Test (#5885)
This commit is contained in:
@@ -71,7 +71,9 @@ public sealed class Joints_Test
|
||||
var physicsSystem = server.Resolve<IEntitySystemManager>().GetEntitySystem<SharedPhysicsSystem>();
|
||||
var mapSystem = entManager.System<SharedMapSystem>();
|
||||
|
||||
var mapId = server.CreateMap().MapId;
|
||||
var map = server.CreateMap();
|
||||
var mapId = map.MapId;
|
||||
var physicsMapComp = entManager.GetComponent<PhysicsMapComponent>(map.Uid);
|
||||
|
||||
var ent1 = entManager.SpawnEntity(null, new MapCoordinates(Vector2.Zero, mapId));
|
||||
var ent2 = entManager.SpawnEntity(null, new MapCoordinates(Vector2.Zero, mapId));
|
||||
@@ -93,7 +95,7 @@ public sealed class Joints_Test
|
||||
Assert.That(entManager.HasComponent<JointComponent>(ent1), Is.EqualTo(true));
|
||||
|
||||
// We should have a contact in both situations.
|
||||
broadphaseSystem.FindNewContacts(mapId);
|
||||
broadphaseSystem.FindNewContacts(physicsMapComp, mapId);
|
||||
Assert.That(body1.Contacts, Has.Count.EqualTo(1));
|
||||
|
||||
// Alright now try the other way
|
||||
@@ -103,7 +105,7 @@ public sealed class Joints_Test
|
||||
jointSystem.Update(0.016f);
|
||||
Assert.That(entManager.HasComponent<JointComponent>(ent1));
|
||||
|
||||
broadphaseSystem.FindNewContacts(mapId);
|
||||
broadphaseSystem.FindNewContacts(physicsMapComp, mapId);
|
||||
Assert.That(body1.Contacts, Has.Count.EqualTo(1));
|
||||
|
||||
mapSystem.DeleteMap(mapId);
|
||||
|
||||
Reference in New Issue
Block a user