Fix debug assert when shooting guns (#21070)

This commit is contained in:
DrSmugleaf
2023-10-17 21:45:35 -07:00
committed by GitHub
parent 13cff0e89b
commit c72b95db6b
5 changed files with 10 additions and 16 deletions

View File

@@ -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]