Remove FixtureId (#19280)

This commit is contained in:
metalgearsloth
2023-08-23 18:55:58 +10:00
committed by GitHub
parent 2cc1f8f0fe
commit 735626654a
23 changed files with 66 additions and 69 deletions

View File

@@ -88,16 +88,16 @@ public abstract class SharedPortalSystem : EntitySystem
component.EnteredPortal = state.EnteredPortal;
}
private bool ShouldCollide(Fixture our, Fixture other)
private bool ShouldCollide(string ourId, string otherId, Fixture our, Fixture other)
{
// most non-hard fixtures shouldn't pass through portals, but projectiles are non-hard as well
// and they should still pass through
return our.ID == PortalFixture && (other.Hard || other.ID == ProjectileFixture);
return ourId == PortalFixture && (other.Hard || otherId == ProjectileFixture);
}
private void OnCollide(EntityUid uid, PortalComponent component, ref StartCollideEvent args)
{
if (!ShouldCollide(args.OurFixture, args.OtherFixture))
if (!ShouldCollide(args.OurFixtureId, args.OtherFixtureId, args.OurFixture, args.OtherFixture))
return;
var subject = args.OtherEntity;
@@ -163,7 +163,7 @@ public abstract class SharedPortalSystem : EntitySystem
private void OnEndCollide(EntityUid uid, PortalComponent component, ref EndCollideEvent args)
{
if (!ShouldCollide(args.OurFixture, args.OtherFixture))
if (!ShouldCollide(args.OurFixtureId, args.OtherFixtureId,args.OurFixture, args.OtherFixture))
return;
var subject = args.OtherEntity;