using Robust.Client.Graphics;
using Robust.Shared.Enums;
using System.Numerics;
+using Content.Shared.StatusIcon.Components;
using static Robust.Shared.Maths.Color;
namespace Content.Client.Overlays;
continue;
}
- var bounds = spriteComponent.Bounds;
+ // we use the status icon component bounds if specified otherwise use sprite
+ var bounds = _entManager.GetComponentOrNull<StatusIconComponent>(uid)?.Bounds ?? spriteComponent.Bounds;
var worldPos = _transform.GetWorldPosition(xform, xformQuery);
if (!bounds.Translated(worldPos).Intersects(args.WorldAABB))
handle.SetTransform(matty);
- var yOffset = spriteComponent.Bounds.Height * EyeManager.PixelsPerMeter / 2 - 3f;
- var widthOfMob = spriteComponent.Bounds.Width * EyeManager.PixelsPerMeter;
+ var yOffset = bounds.Height * EyeManager.PixelsPerMeter / 2 - 3f;
+ var widthOfMob = bounds.Width * EyeManager.PixelsPerMeter;
var position = new Vector2(-widthOfMob / EyeManager.PixelsPerMeter / 2, yOffset / EyeManager.PixelsPerMeter);