]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
fix singulo generator triggering failsafe when field is obstructed (#39593)
authorqwerltaz <69696513+qwerltaz@users.noreply.github.com>
Fri, 10 Oct 2025 19:41:21 +0000 (21:41 +0200)
committerGitHub <noreply@github.com>
Fri, 10 Oct 2025 19:41:21 +0000 (19:41 +0000)
fix singulo gen failsafe when field obstructed

Content.Server/Singularity/EntitySystems/SingularityGeneratorSystem.cs

index 8e33410561c2c2270718602ba487267a6e16f0f4..884d62504552c6668c45fa03942588f0a3ca9cf9 100644 (file)
@@ -176,9 +176,10 @@ public sealed class SingularityGeneratorSystem : SharedSingularityGeneratorSyste
 
         foreach (var result in rayCastResults)
         {
-            if (genQuery.HasComponent(result.HitEntity))
-                closestResult = result;
+            if (!genQuery.HasComponent(result.HitEntity))
+                continue;
 
+            closestResult = result;
             break;
         }