chore: cleanup pointer management for LDF data (#1995)

* change network settings from vector to LwoNameValue

* move settings on Entity to managed memory

* Migrate more members

* chore: remove pointer leakage from raw ldf pointers

* feedback

* fix ci
This commit is contained in:
David Markowitz
2026-06-14 20:54:52 -07:00
committed by GitHub
parent 90db1ac699
commit 0101933f5c
67 changed files with 676 additions and 754 deletions

View File

@@ -97,17 +97,14 @@ void AmDarklingDragon::OnHitOrHealResult(Entity* self, Entity* attacker, int32_t
info.pos = objectPosition;
info.rot = rotation;
info.spawnerID = self->GetObjectID();
info.settings = {
new LDFData<std::string>(u"rebuild_activators",
info.settings.Insert<std::string>(u"rebuild_activators",
std::to_string(objectPosition.x + forward.x) + "\x1f" +
std::to_string(objectPosition.y) + "\x1f" +
std::to_string(objectPosition.z + forward.z)
),
new LDFData<int32_t>(u"respawn", 100000),
new LDFData<float>(u"rebuild_reset_time", 15),
new LDFData<bool>(u"no_timed_spawn", true),
new LDFData<LWOOBJID>(u"Dragon", self->GetObjectID())
};
std::to_string(objectPosition.z + forward.z));
info.settings.Insert<int32_t>(u"respawn", 100000);
info.settings.Insert<float>(u"rebuild_reset_time", 15);
info.settings.Insert<bool>(u"no_timed_spawn", true);
info.settings.Insert<LWOOBJID>(u"Dragon", self->GetObjectID());
auto* golemObject = Game::entityManager->CreateEntity(info);