Damaged by contact fix (#31921)
This commit is contained in:
@@ -42,11 +42,11 @@ public sealed class DamageContactsSystem : EntitySystem
|
|||||||
{
|
{
|
||||||
var otherUid = args.OtherEntity;
|
var otherUid = args.OtherEntity;
|
||||||
|
|
||||||
if (!TryComp<PhysicsComponent>(uid, out var body))
|
if (!TryComp<PhysicsComponent>(otherUid, out var body))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var damageQuery = GetEntityQuery<DamageContactsComponent>();
|
var damageQuery = GetEntityQuery<DamageContactsComponent>();
|
||||||
foreach (var ent in _physics.GetContactingEntities(uid, body))
|
foreach (var ent in _physics.GetContactingEntities(otherUid, body))
|
||||||
{
|
{
|
||||||
if (ent == uid)
|
if (ent == uid)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user