Update for collision events by-ref (#10933)

This commit is contained in:
metalgearsloth
2022-09-14 17:26:26 +10:00
committed by GitHub
parent feb50ce7cc
commit 78a4ab6eb2
105 changed files with 204 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
using Content.Server.Shuttles.Components;
using Content.Shared.Shuttles.Components;
using Content.Shared.Shuttles.Events;
using Robust.Shared.Physics.Components;
using Robust.Shared.Players;
using Robust.Shared.Utility;

View File

@@ -8,8 +8,10 @@ using Content.Shared.Shuttles.Events;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Dynamics.Joints;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Utility;
namespace Content.Server.Shuttles.Systems

View File

@@ -13,6 +13,7 @@ using Content.Shared.Shuttles.Systems;
using Content.Shared.Tag;
using Robust.Server.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Physics.Components;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using Robust.Shared.Utility;

View File

@@ -17,6 +17,7 @@ using Robust.Shared.Audio;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Player;
using Robust.Shared.Random;

View File

@@ -14,6 +14,7 @@ using Robust.Shared.Player;
using Robust.Shared.Utility;
using System.Diagnostics.CodeAnalysis;
using Content.Server.Shuttles.Events;
using Robust.Shared.Physics.Components;
namespace Content.Server.Shuttles.Systems;

View File

@@ -7,6 +7,8 @@ using Robust.Server.GameObjects;
using Robust.Shared.Configuration;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Systems;
namespace Content.Server.Shuttles.Systems
{

View File

@@ -1,6 +1,7 @@
using Content.Server.Shuttles.Components;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Events;
namespace Content.Server.Shuttles.Systems;
@@ -15,7 +16,7 @@ public sealed class SpaceGarbageSystem : EntitySystem
SubscribeLocalEvent<SpaceGarbageComponent, StartCollideEvent>(OnCollide);
}
private void OnCollide(EntityUid uid, SpaceGarbageComponent component, StartCollideEvent args)
private void OnCollide(EntityUid uid, SpaceGarbageComponent component, ref StartCollideEvent args)
{
if (args.OtherFixture.Body.BodyType != BodyType.Static) return;

View File

@@ -15,7 +15,10 @@ using Robust.Server.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Collision.Shapes;
using Robust.Shared.Physics.Components;
using Robust.Shared.Physics.Dynamics;
using Robust.Shared.Physics.Events;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Utility;
namespace Content.Server.Shuttles.Systems
@@ -418,7 +421,7 @@ namespace Content.Server.Shuttles.Systems
}
}
private void OnStartCollide(EntityUid uid, ThrusterComponent component, StartCollideEvent args)
private void OnStartCollide(EntityUid uid, ThrusterComponent component, ref StartCollideEvent args)
{
if (args.OurFixture.ID != BurnFixture) return;
@@ -426,7 +429,7 @@ namespace Content.Server.Shuttles.Systems
component.Colliding.Add((args.OtherFixture.Body).Owner);
}
private void OnEndCollide(EntityUid uid, ThrusterComponent component, EndCollideEvent args)
private void OnEndCollide(EntityUid uid, ThrusterComponent component, ref EndCollideEvent args)
{
if (args.OurFixture.ID != BurnFixture) return;