diff --git a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs index dbe55bb6e5..7fad69e349 100644 --- a/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs +++ b/Content.Server/ParticleAccelerator/EntitySystems/ParticleAcceleratorSystem.Emitter.cs @@ -38,7 +38,7 @@ public sealed partial class ParticleAcceleratorSystem } if (TryComp(emitted, out var proj)) - _projectileSystem.SetShooter(proj, uid); + _projectileSystem.SetShooter(emitted, proj, uid); if (TryComp(emitted, out var food)) { diff --git a/Content.Server/Projectiles/ProjectileSystem.cs b/Content.Server/Projectiles/ProjectileSystem.cs index c52e712e74..b8a6b8c5b2 100644 --- a/Content.Server/Projectiles/ProjectileSystem.cs +++ b/Content.Server/Projectiles/ProjectileSystem.cs @@ -4,11 +4,10 @@ using Content.Server.Weapons.Ranged.Systems; using Content.Shared.Camera; using Content.Shared.Damage; using Content.Shared.Database; -using Content.Shared.FixedPoint; using Content.Shared.Projectiles; using Robust.Server.GameObjects; -using Robust.Shared.Player; using Robust.Shared.Physics.Events; +using Robust.Shared.Player; namespace Content.Server.Projectiles; @@ -39,7 +38,7 @@ public sealed class ProjectileSystem : SharedProjectileSystem RaiseLocalEvent(target, ref attemptEv); if (attemptEv.Cancelled) { - SetShooter(component, target); + SetShooter(uid, component, target); return; } diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index e737cd0a8d..652ca236e4 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -291,7 +291,7 @@ namespace Content.Server.Singularity.EntitySystems var xform = Transform(uid); var ent = Spawn(component.BoltType, xform.Coordinates); var proj = EnsureComp(ent); - _projectile.SetShooter(proj, uid); + _projectile.SetShooter(ent, proj, uid); var targetPos = new EntityCoordinates(uid, new Vector2(0, -1)); diff --git a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs index adda6a94e3..bbac7acd12 100644 --- a/Content.Server/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapons/Ranged/Systems/GunSystem.cs @@ -10,13 +10,13 @@ using Content.Shared.Damage; using Content.Shared.Damage.Systems; using Content.Shared.Database; using Content.Shared.Effects; -using Content.Shared.FixedPoint; using Content.Shared.Interaction.Components; using Content.Shared.Projectiles; using Content.Shared.Weapons.Melee; using Content.Shared.Weapons.Ranged; using Content.Shared.Weapons.Ranged.Components; using Content.Shared.Weapons.Ranged.Events; +using Content.Shared.Weapons.Ranged.Systems; using Content.Shared.Weapons.Reflect; using Robust.Server.GameObjects; using Robust.Shared.Audio; @@ -26,7 +26,6 @@ using Robust.Shared.Physics.Components; using Robust.Shared.Player; using Robust.Shared.Prototypes; using Robust.Shared.Utility; -using SharedGunSystem = Content.Shared.Weapons.Ranged.Systems.SharedGunSystem; namespace Content.Server.Weapons.Ranged.Systems; @@ -305,7 +304,7 @@ public sealed partial class GunSystem : SharedGunSystem if (user != null) { var projectile = EnsureComp(uid); - Projectiles.SetShooter(projectile, user.Value); + Projectiles.SetShooter(uid, projectile, user.Value); projectile.Weapon = gunUid; } diff --git a/Content.Shared/Projectiles/SharedProjectileSystem.cs b/Content.Shared/Projectiles/SharedProjectileSystem.cs index 1df743bc0b..63b4cb13aa 100644 --- a/Content.Shared/Projectiles/SharedProjectileSystem.cs +++ b/Content.Shared/Projectiles/SharedProjectileSystem.cs @@ -3,11 +3,7 @@ using Content.Shared.Damage; using Content.Shared.DoAfter; using Content.Shared.Hands.EntitySystems; using Content.Shared.Interaction; -using Content.Shared.Projectiles; -using Content.Shared.Sound.Components; using Content.Shared.Throwing; -using Content.Shared.Weapons.Ranged.Components; -using Robust.Shared.Audio; using Robust.Shared.Map; using Robust.Shared.Network; using Robust.Shared.Physics; @@ -139,13 +135,13 @@ public abstract partial class SharedProjectileSystem : EntitySystem } } - public void SetShooter(ProjectileComponent component, EntityUid uid) + public void SetShooter(EntityUid id, ProjectileComponent component, EntityUid shooterId) { - if (component.Shooter == uid) + if (component.Shooter == shooterId) return; - component.Shooter = uid; - Dirty(uid, component); + component.Shooter = shooterId; + Dirty(id, component); } [Serializable, NetSerializable]