Bandaid fixtureless buttons (#11748)

This commit is contained in:
metalgearsloth
2022-10-07 17:12:46 +11:00
committed by GitHub
parent 12d2e81ced
commit 89bc61b1b9

View File

@@ -451,7 +451,11 @@ namespace Content.Shared.Interaction
// that means we wouldn't be able to easily check overlap interactions.
if (range > 0f &&
TryComp<FixturesComponent>(origin, out var fixtureA) &&
// These fixture counts are stuff that has the component but no fixtures for <reasons> (e.g. buttons).
// At least until they get removed.
fixtureA.FixtureCount > 0 &&
TryComp<FixturesComponent>(other, out var fixtureB) &&
fixtureB.FixtureCount > 0 &&
TryComp<TransformComponent>(origin, out var xformA) &&
TryComp<TransformComponent>(other, out var xformB))
{