]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Update RadiationPulseOverlay.cs to have 0 warnings (#30004)
authorWinkarst <74284083+Winkarst-cpu@users.noreply.github.com>
Sat, 13 Jul 2024 16:45:34 +0000 (19:45 +0300)
committerGitHub <noreply@github.com>
Sat, 13 Jul 2024 16:45:34 +0000 (18:45 +0200)
Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs

index 8d5607af2d061774c797c369b20b541a4d73742c..9ec24fae0ef301cc8765e4657c6ba0377690ce0b 100644 (file)
@@ -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<TransformComponent>(pulseEntity);
             var transformSystem = _entityManager.System<SharedTransformSystem>();
             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)