From 1cb8718c87edbcb0075a3d144afb64f3290d2283 Mon Sep 17 00:00:00 2001 From: DCFApixels <99481254+DCFApixels@users.noreply.github.com> Date: Thu, 15 May 2025 12:33:45 +0800 Subject: [PATCH] fix --- src/Utils/DependencyGraph.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Utils/DependencyGraph.cs b/src/Utils/DependencyGraph.cs index c499959..c1bddb2 100644 --- a/src/Utils/DependencyGraph.cs +++ b/src/Utils/DependencyGraph.cs @@ -158,12 +158,16 @@ namespace DCFApixels.DragonECS.Core private void AddVertexByID(VertexID id) { ref var info = ref GetVertexInfo(id); - if (info.isContained == false || info.isLocked == false) + + if (info.isContained == false && info.isLocked || info.isLocked == false) + { + info.insertionIndex = _increment++; + } + if (info.isContained == false) { _count++; info.isContained = true; } - info.insertionIndex = _increment++; } public bool RemoveVertex(T vertex) {