Skip to content

Commit

Permalink
Update TriggerSystem.Proximity.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
aw-c committed Jun 24, 2023
1 parent 37e7239 commit 440919b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ private bool ShouldCollideThroughWall(EntityUid uid, TriggerOnProximityComponent
if (component.TriggerBehindWall)
return true;

TryComp<TransformComponent>(uid, out var entTransform);
TryComp<TransformComponent>(args.OtherBody.Owner, out var otherTranform);

if (entTransform != null && otherTranform != null)
if (TryComp<TransformComponent>(uid, out var entTransform) &&
TryComp<TransformComponent>(args.OtherBody.Owner, out var otherTranform))
{
SharedPhysicsSystem physSystem = EntityManager.System<SharedPhysicsSystem>();

Expand Down

0 comments on commit 440919b

Please sign in to comment.