From da3e331366d9df0053cb6df5423b1b04d854d9eb Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Fri, 5 Dec 2025 13:37:02 +0100 Subject: [PATCH] C# 14 fixes (#41708) Necessary for the move to .NET 10 & C# 14. Actual PR to change SS14 to C# 14 will be separate. --- Content.Client/Parallax/Managers/ParallaxManager.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Content.Client/Parallax/Managers/ParallaxManager.cs b/Content.Client/Parallax/Managers/ParallaxManager.cs index bc7d7d60d6..bd46288ebf 100644 --- a/Content.Client/Parallax/Managers/ParallaxManager.cs +++ b/Content.Client/Parallax/Managers/ParallaxManager.cs @@ -98,10 +98,13 @@ public sealed class ParallaxManager : IParallaxManager } else { - layers = await Task.WhenAll( + // Explicitly allocate params array to avoid sandbox violation since C# 14. + var tasks = new[] + { LoadParallaxLayers(parallaxPrototype.Layers, loadedLayers, cancel), - LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel) - ); + LoadParallaxLayers(parallaxPrototype.LayersLQ, loadedLayers, cancel), + }; + layers = await Task.WhenAll(tasks); } cancel.ThrowIfCancellationRequested(); -- 2.52.0