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

@@ -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<ProjectileComponent>(uid);
Projectiles.SetShooter(projectile, user.Value);
Projectiles.SetShooter(uid, projectile, user.Value);
projectile.Weapon = gunUid;
}