From 7662b17d493a89c368350ea31743cc653fb78ed6 Mon Sep 17 00:00:00 2001 From: metalgearsloth Date: Wed, 2 Oct 2024 17:35:50 +1000 Subject: [PATCH] Add another lookup overload --- .../Systems/EntityLookupSystem.ComponentQueries.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Robust.Shared/GameObjects/Systems/EntityLookupSystem.ComponentQueries.cs b/Robust.Shared/GameObjects/Systems/EntityLookupSystem.ComponentQueries.cs index 02280cecfde..ddcab6d49b1 100644 --- a/Robust.Shared/GameObjects/Systems/EntityLookupSystem.ComponentQueries.cs +++ b/Robust.Shared/GameObjects/Systems/EntityLookupSystem.ComponentQueries.cs @@ -496,6 +496,16 @@ public void GetEntitiesIntersecting(Type type, MapId mapId, Box2 worldAABB, Hash GetEntitiesIntersecting(type, mapId, shape, transform, intersecting, flags); } + public void GetEntitiesIntersecting(MapId mapId, Box2Rotated worldBounds, HashSet> entities, LookupFlags flags = DefaultFlags) where T : IComponent + { + if (mapId == MapId.Nullspace) return; + + var shape = new Polygon(worldBounds); + var shapeTransform = Physics.Transform.Empty; + + GetEntitiesIntersecting(mapId, shape, shapeTransform, entities, flags); + } + public void GetEntitiesIntersecting(MapId mapId, Box2 worldAABB, HashSet> entities, LookupFlags flags = DefaultFlags) where T : IComponent { if (mapId == MapId.Nullspace) return;