Skip to content

Commit

Permalink
Update RadiationPulseOverlay.cs to have 0 warnings (#30004)
Browse files Browse the repository at this point in the history
  • Loading branch information
Winkarst-cpu authored Jul 13, 2024
1 parent dcb3443 commit bf4ef62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Content.Client/Radiation/Overlays/RadiationPulseOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ private void RadiationQuery(IEye? currentEye)
var shaderInstance = _pulses[pulseEntity];
shaderInstance.instance.CurrentMapCoords = _transform.GetMapCoordinates(pulseEntity);
shaderInstance.instance.Range = pulse.VisualRange;
} else {
}
else
{
_pulses[pulseEntity].shd.Dispose();
_pulses.Remove(pulseEntity);
}
Expand All @@ -129,7 +131,7 @@ private bool PulseQualifies(EntityUid pulseEntity, MapCoordinates currentEyeLoc)
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)
Expand Down

0 comments on commit bf4ef62

Please sign in to comment.