]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
C# 14 fixes (#41708)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 5 Dec 2025 12:37:02 +0000 (13:37 +0100)
committerGitHub <noreply@github.com>
Fri, 5 Dec 2025 12:37:02 +0000 (12:37 +0000)
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

index bc7d7d60d681dfd58f0fecac437feee8dc97fc9c..bd46288ebfd93e49d2ad3418b5676ed2c3faac96 100644 (file)
@@ -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();