Remove obsolete Fixture.Body references (#16259)

This commit is contained in:
Leon Friedrich
2023-05-09 19:21:26 +12:00
committed by GitHub
parent dac7025cc5
commit 2bd5fb3736
32 changed files with 67 additions and 77 deletions

View File

@@ -40,7 +40,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
if (args.OurFixture.ID != ProjectileFixture || !args.OtherFixture.Hard || component.DamagedEntity)
return;
var otherEntity = args.OtherFixture.Body.Owner;
var otherEntity = args.OtherEntity;
// it's here so this check is only done once before possible hit
var attemptEv = new ProjectileReflectAttemptEvent(uid, component, false);
RaiseLocalEvent(otherEntity, ref attemptEv);
@@ -51,7 +51,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem
}
var otherName = ToPrettyString(otherEntity);
var direction = args.OurFixture.Body.LinearVelocity.Normalized;
var direction = args.OurBody.LinearVelocity.Normalized;
var modifiedDamage = _damageableSystem.TryChangeDamage(otherEntity, component.Damage, component.IgnoreResistances, origin: component.Shooter);
component.DamagedEntity = true;
var deleted = Deleted(otherEntity);