From 23be8a1e03274afe2aa22b2ccd3b8e903a122da4 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Wed, 23 Nov 2022 17:35:06 +1100 Subject: [PATCH] Fix invalid gun coords being sent (#12699) --- Content.Client/Weapons/Ranged/Systems/GunSystem.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs index 67d50e3f0d..55d670d054 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs @@ -149,6 +149,15 @@ public sealed partial class GunSystem : SharedGunSystem return; var mousePos = _eyeManager.ScreenToMap(_inputManager.MouseScreenPosition); + + if (mousePos.MapId == MapId.Nullspace) + { + if (gun.ShotCounter != 0) + EntityManager.RaisePredictiveEvent(new RequestStopShootEvent { Gun = gun.Owner }); + + return; + } + EntityCoordinates coordinates; // Bro why would I want a ternary here