From c5f19fd2ed5393c50fd9ccea8957f9a0d7d7b276 Mon Sep 17 00:00:00 2001 From: Kirus59 <145689588+Kirus59@users.noreply.github.com> Date: Sun, 8 Sep 2024 02:46:24 +0300 Subject: [PATCH] Damaged by contact fix (#31921) --- Content.Shared/Damage/Systems/DamageContactsSystem.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Content.Shared/Damage/Systems/DamageContactsSystem.cs b/Content.Shared/Damage/Systems/DamageContactsSystem.cs index 3cc73a87c5..9a53d83eb2 100644 --- a/Content.Shared/Damage/Systems/DamageContactsSystem.cs +++ b/Content.Shared/Damage/Systems/DamageContactsSystem.cs @@ -42,11 +42,11 @@ public sealed class DamageContactsSystem : EntitySystem { var otherUid = args.OtherEntity; - if (!TryComp(uid, out var body)) + if (!TryComp(otherUid, out var body)) return; var damageQuery = GetEntityQuery(); - foreach (var ent in _physics.GetContactingEntities(uid, body)) + foreach (var ent in _physics.GetContactingEntities(otherUid, body)) { if (ent == uid) continue;