Fix invalid gun coords being sent (#12699)

This commit is contained in:
metalgearsloth
2022-11-23 17:35:06 +11:00
committed by GitHub
parent 8868878b70
commit 23be8a1e03

View File

@@ -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