mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-06-17 12:14:21 +00:00
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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user