Remove Ammo component references (#19537)
This commit is contained in:
@@ -34,13 +34,13 @@ public sealed partial class GunSystem
|
||||
component.Entities.RemoveAt(component.Entities.Count - 1);
|
||||
|
||||
component.Container.Remove(existing);
|
||||
EnsureComp<AmmoComponent>(existing);
|
||||
EnsureShootable(existing);
|
||||
}
|
||||
else if (component.UnspawnedCount > 0)
|
||||
{
|
||||
component.UnspawnedCount--;
|
||||
ent = Spawn(component.FillProto, coordinates);
|
||||
EnsureComp<AmmoComponent>(ent.Value);
|
||||
EnsureShootable(ent.Value);
|
||||
}
|
||||
|
||||
if (ent != null && ent.Value.IsClientSide())
|
||||
|
||||
@@ -191,7 +191,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
if (ent!.Value.IsClientSide())
|
||||
Del(ent.Value);
|
||||
else
|
||||
RemComp<AmmoComponent>(ent.Value);
|
||||
RemoveShootable(ent.Value);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
if (ent!.Value.IsClientSide())
|
||||
Del(ent.Value);
|
||||
else
|
||||
RemComp<AmmoComponent>(ent.Value);
|
||||
RemoveShootable(ent.Value);
|
||||
break;
|
||||
case HitscanPrototype:
|
||||
Audio.PlayPredicted(gun.SoundGunshot, gunUid, user);
|
||||
|
||||
Reference in New Issue
Block a user