From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Sat, 13 Jul 2024 16:45:34 +0000 (+0300) Subject: Update RadiationPulseOverlay.cs to have 0 warnings (#30004) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=bf4ef62ab3a5be3ecd8aa2ff259622070c8bca32;p=space-station-14.git Update RadiationPulseOverlay.cs to have 0 warnings (#30004) --- diff --git a/Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs b/Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs index 8d5607af2d..9ec24fae0e 100644 --- a/Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs +++ b/Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs @@ -116,7 +116,9 @@ namespace Content.Client.Radiation.Overlays var shaderInstance = _pulses[pulseEntity]; shaderInstance.instance.CurrentMapCoords = _transform.GetMapCoordinates(pulseEntity); shaderInstance.instance.Range = pulse.VisualRange; - } else { + } + else + { _pulses[pulseEntity].shd.Dispose(); _pulses.Remove(pulseEntity); } @@ -129,7 +131,7 @@ namespace Content.Client.Radiation.Overlays var transformComponent = _entityManager.GetComponent(pulseEntity); var transformSystem = _entityManager.System(); return transformComponent.MapID == currentEyeLoc.MapId - && transformComponent.Coordinates.InRange(_entityManager, transformSystem, EntityCoordinates.FromMap(transformComponent.ParentUid, currentEyeLoc, transformSystem, _entityManager), MaxDist); + && transformSystem.InRange(transformComponent.Coordinates, transformSystem.ToCoordinates(transformComponent.ParentUid, currentEyeLoc), MaxDist); } private sealed record RadiationShaderInstance(MapCoordinates CurrentMapCoords, float Range, TimeSpan Start, float Duration)