From 0efb7ba14df78558e1f2e259e2590a9b82561471 Mon Sep 17 00:00:00 2001 From: Soar Qin Date: Wed, 4 Jun 2025 00:25:43 +0800 Subject: [PATCH] crash fix --- CheatEnabler/Functions/DysonSphereFunctions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CheatEnabler/Functions/DysonSphereFunctions.cs b/CheatEnabler/Functions/DysonSphereFunctions.cs index 7024c34..a78e664 100644 --- a/CheatEnabler/Functions/DysonSphereFunctions.cs +++ b/CheatEnabler/Functions/DysonSphereFunctions.cs @@ -776,7 +776,7 @@ public static class DysonSphereFunctions isEuler.AddRange(shell.frames.Select(frame => frame.euler)); break; } - break; + if (nodePos.Count > 0) break; } if (nodePos.Count == 0) { @@ -936,6 +936,7 @@ public static class DysonSphereFunctions for (var j = 1; j < layer.shellCursor; j++) { var shell = layer.shellPool[j]; + if (shell == null || shell.id != j) continue; shell.nodeIndexMap.Clear(); for (var k = 0; k < shell.nodes.Count; k++) { @@ -945,6 +946,7 @@ public static class DysonSphereFunctions for (var j = 1; j < layer.nodeCursor; j++) { var node = layer.nodePool[j]; + if (node == null || node.id != j) continue; dysonSphere.AddDysonNodeRData(node, true); node.RecalcSpReq(); node.RecalcCpReq();