Remove Ammo component references (#19537)
This commit is contained in:
@@ -17,13 +17,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)
|
||||
|
||||
@@ -283,7 +283,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
// Do a throw
|
||||
if (!HasComp<ProjectileComponent>(uid))
|
||||
{
|
||||
RemComp<AmmoComponent>(uid);
|
||||
RemoveShootable(uid);
|
||||
// TODO: Someone can probably yeet this a billion miles so need to pre-validate input somewhere up the call stack.
|
||||
ThrowingSystem.TryThrow(uid, mapDirection, gun.ProjectileSpeed, user);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user