Fix tranquiliser shells not working (#23886)

* Fix tranquiliser darts not working

Fixes a bug introduced by 9f47079d02a872f0aaff84f4556b83d3c6f835ef which
was made to stop the fly-by fixture from triggering the system. This was
done by checking whether the fixture was hard. Apparently the
projectile's fixture is never hard as well. The change just makes it so
that check only succeeds when the fixture is a fly-by fixture.

* Remove something that I think is redundant

* Remove random using directive that somehow appeared.

* Address Review

* Adress Review 2

* Put the appropriate fixture ids

(cherry picked from commit ef132c8a7b83691ab550e1cfe5d31fd8be2b3788)
This commit is contained in:
nikthechampiongr
2024-01-11 01:02:37 +02:00
committed by Debug
parent e36dd93b60
commit 8b414701ca
4 changed files with 8 additions and 1 deletions

View File

@@ -26,7 +26,7 @@ public sealed class SolutionInjectOnCollideSystem : EntitySystem
var target = args.OtherEntity;
if (!args.OtherBody.Hard ||
!args.OurBody.Hard ||
args.OurFixtureId != ent.Comp.FixtureId ||
!EntityManager.TryGetComponent<BloodstreamComponent>(target, out var bloodstream) ||
!_solutionContainersSystem.TryGetInjectableSolution(ent.Owner, out var solution, out _))
{