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

@@ -82,15 +82,12 @@ void BaseEnemyApe::OnTimerDone(Entity* self, std::string timerName) {
entityInfo.spawnerID = self->GetObjectID();
entityInfo.lot = self->GetVar<LOT>(u"QuickbuildAnchorLOT") != 0
? self->GetVar<LOT>(u"QuickbuildAnchorLOT") : 7549;
entityInfo.settings = {
new LDFData<std::string>(u"rebuild_activators",
entityInfo.settings.Insert<std::string>(u"rebuild_activators",
std::to_string(objectPosition.GetX()) + "\x1f" +
std::to_string(objectPosition.GetY()) + "\x1f" +
std::to_string(objectPosition.GetZ())
),
new LDFData<bool>(u"no_timed_spawn", true),
new LDFData<LWOOBJID>(u"ape", self->GetObjectID())
};
std::to_string(objectPosition.GetZ()));
entityInfo.settings.Insert<bool>(u"no_timed_spawn", true);
entityInfo.settings.Insert<LWOOBJID>(u"ape", self->GetObjectID());
auto* anchor = Game::entityManager->CreateEntity(entityInfo, nullptr, self);
Game::entityManager->ConstructEntity(anchor);