Fixes ShowHandItemOverlay freezing the game when the item in question has no sprite component.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using Content.Shared.CCVar;
|
using Content.Shared.CCVar;
|
||||||
|
using Robust.Client.GameObjects;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Client.Input;
|
using Robust.Client.Input;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
@@ -45,7 +46,7 @@ namespace Content.Client.Hands
|
|||||||
var sys = EntitySystem.Get<HandsSystem>();
|
var sys = EntitySystem.Get<HandsSystem>();
|
||||||
var handEntity = sys.GetActiveHandEntity();
|
var handEntity = sys.GetActiveHandEntity();
|
||||||
|
|
||||||
if (handEntity == null || !_cfg.GetCVar(CCVars.HudHeldItemShow))
|
if (handEntity == null || !_cfg.GetCVar(CCVars.HudHeldItemShow) || !handEntity.HasComponent<ISpriteComponent>())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var screen = args.ScreenHandle;
|
var screen = args.ScreenHandle;
|
||||||
|
|||||||
4
Resources/Changelog/Parts/overlay.yml
Normal file
4
Resources/Changelog/Parts/overlay.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: Zumorica
|
||||||
|
changes:
|
||||||
|
- type: Fix # One of the following: Add, Remove, Tweak, Fix
|
||||||
|
message: Fixes pulling items with hand item cursor overlay freezing the game.
|
||||||
Reference in New Issue
Block a user