From 3ed408de5d5ef95613b17c05deca8a8693102871 Mon Sep 17 00:00:00 2001 From: Tayrtahn Date: Thu, 24 Apr 2025 04:09:27 -0400 Subject: [PATCH] Fix warnings in Joints_Test (#5885) --- Robust.UnitTesting/Shared/Physics/Joints_Test.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Robust.UnitTesting/Shared/Physics/Joints_Test.cs b/Robust.UnitTesting/Shared/Physics/Joints_Test.cs index 0f5c72814..8c8a9cf20 100644 --- a/Robust.UnitTesting/Shared/Physics/Joints_Test.cs +++ b/Robust.UnitTesting/Shared/Physics/Joints_Test.cs @@ -71,7 +71,9 @@ public sealed class Joints_Test var physicsSystem = server.Resolve().GetEntitySystem(); var mapSystem = entManager.System(); - var mapId = server.CreateMap().MapId; + var map = server.CreateMap(); + var mapId = map.MapId; + var physicsMapComp = entManager.GetComponent(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(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(ent1)); - broadphaseSystem.FindNewContacts(mapId); + broadphaseSystem.FindNewContacts(physicsMapComp, mapId); Assert.That(body1.Contacts, Has.Count.EqualTo(1)); mapSystem.DeleteMap(mapId);