Update for collision events by-ref (#10933)
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
using Content.Shared.Movement.Components;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Dynamics;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Physics.Systems;
|
||||
|
||||
namespace Content.Shared.Movement.Systems;
|
||||
|
||||
@@ -85,14 +88,14 @@ public sealed class SlowContactsSystem : EntitySystem
|
||||
_toRemove.Add(uid);
|
||||
}
|
||||
|
||||
private void OnEntityExit(EntityUid uid, SlowContactsComponent component, EndCollideEvent args)
|
||||
private void OnEntityExit(EntityUid uid, SlowContactsComponent component, ref EndCollideEvent args)
|
||||
{
|
||||
var otherUid = args.OtherFixture.Body.Owner;
|
||||
if (HasComp<MovementSpeedModifierComponent>(otherUid))
|
||||
_toUpdate.Add(otherUid);
|
||||
}
|
||||
|
||||
private void OnEntityEnter(EntityUid uid, SlowContactsComponent component, StartCollideEvent args)
|
||||
private void OnEntityEnter(EntityUid uid, SlowContactsComponent component, ref StartCollideEvent args)
|
||||
{
|
||||
var otherUid = args.OtherFixture.Body.Owner;
|
||||
if (!HasComp<MovementSpeedModifierComponent>(otherUid))
|
||||
|
||||
Reference in New Issue
Block a user