Fix tethergun (#13163)

This commit is contained in:
metalgearsloth
2022-12-25 08:24:43 +11:00
committed by GitHub
parent 21d1b885d6
commit a5f17a590f
4 changed files with 13 additions and 11 deletions

View File

@@ -17,7 +17,6 @@ public sealed class TetherGunSystem : SharedTetherGunSystem
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly IInputManager _inputManager = default!;
[Dependency] private readonly EntityLookupSystem _lookup = default!;
[Dependency] private readonly InputSystem _inputSystem = default!;
public bool Enabled { get; set; }
@@ -85,15 +84,10 @@ public sealed class TetherGunSystem : SharedTetherGunSystem
if (gameState is GameplayState game)
{
EntityUid? uid;
var uid = game.GetEntityUnderPosition(mousePos);
foreach (var ent in _lookup.GetEntitiesIntersecting(mousePos, LookupFlags.Approximate | LookupFlags.Static))
{
uid = game.GetEntityUnderPosition(mousePos);
if (uid != null)
StartDragging(uid.Value, mousePos);
}
if (uid != null)
StartDragging(uid.Value, mousePos);
}
if (_dragging == null)