Root nodes join through ModRoot.AddDeferred, so a reload that unloads the mod first never hands Godot a freed node
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
afc49a16e0
commit
0027c8ded0
1 file changed
+1
-1
@@ -32,7 +32,7 @@ namespace Cthangover.Mods.Rpg.Tests
|
|||||||
.Select(a => a.Substring("--shots=".Length))
|
.Select(a => a.Substring("--shots=".Length))
|
||||||
.FirstOrDefault();
|
.FirstOrDefault();
|
||||||
GameLogger.Log("TEST", $"RpgWalkTestInitializer: activating rpg_walk, shots={shots ?? "off"}");
|
GameLogger.Log("TEST", $"RpgWalkTestInitializer: activating rpg_walk, shots={shots ?? "off"}");
|
||||||
(Godot.Engine.GetMainLoop() as SceneTree)?.Root?.CallDeferred("add_child", new RpgWalkTestDriver(shots));
|
ModRoot.AddDeferred(new RpgWalkTestDriver(shots));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user