feat: updated engine

This commit is contained in:
Sara Gerretsen 2026-07-10 17:04:34 +02:00
parent cbe99774ff
commit f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions

View file

@ -32,8 +32,10 @@
#include "core/core_bind.h"
#include "core/io/compression.h"
#include "core/io/resource_loader.h"
#include "core/object/class_db.h"
#include "core/object/script_language.h"
#include "scene/debugger/scene_debugger.h"
#include "scene/debugger/scene_debugger_object.h"
#if defined(MODULE_GDSCRIPT_ENABLED) && defined(DEBUG_ENABLED)
#include "modules/gdscript/gdscript.h"
@ -275,11 +277,11 @@ void GameStateSnapshot::_get_rc_cycles(
SnapshotDataObject *next = objects[next_child.value];
if (next != nullptr && next->is_class(RefCounted::get_class_static()) && !next->is_class(WeakRef::get_class_static()) && !p_traversed_objs.has(next)) {
HashSet<SnapshotDataObject *> traversed_copy = p_traversed_objs;
HashSet<SnapshotDataObject *> traversed_copy(p_traversed_objs);
if (p_obj != p_source_obj) {
traversed_copy.insert(p_obj);
}
_get_rc_cycles(next, p_source_obj, traversed_copy, r_ret_val, child_path);
_get_rc_cycles(next, p_source_obj, std::move(traversed_copy), r_ret_val, child_path);
}
}
}
@ -310,10 +312,9 @@ void GameStateSnapshot::recompute_references() {
if (!obj.value->is_class(RefCounted::get_class_static()) || obj.value->is_class(WeakRef::get_class_static())) {
continue;
}
HashSet<SnapshotDataObject *> traversed_objs;
LocalVector<String> cycles;
_get_rc_cycles(obj.value, obj.value, traversed_objs, cycles, "");
_get_rc_cycles(obj.value, obj.value, HashSet<SnapshotDataObject *>(), cycles, "");
Array cycles_array;
for (const String &cycle : cycles) {
cycles_array.push_back(cycle);