From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 29 Mar 2023 08:50:54 +0000 (+1100) Subject: Don't spawn muzzle flashes for unresolvable coordinates (#14949) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=168299dbc41ca1b057c911992a9cf5a1a1e4fe62;p=space-station-14.git Don't spawn muzzle flashes for unresolvable coordinates (#14949) --- diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs index 0a7d62970f..d6f068fcb1 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs @@ -258,6 +258,9 @@ public sealed partial class GunSystem : SharedGunSystem else return; + if (!coordinates.IsValid(EntityManager)) + return; + var ent = Spawn(message.Prototype, coordinates); var effectXform = Transform(ent);