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:
@@ -38,10 +38,8 @@ void FvPandaSpawnerServer::OnCollisionPhantom(Entity* self, Entity* target) {
|
||||
info.spawnerID = target->GetObjectID();
|
||||
info.pos = self->GetPosition();
|
||||
info.lot = 5643;
|
||||
info.settings = {
|
||||
new LDFData<LWOOBJID>(u"tamer", target->GetObjectID()),
|
||||
new LDFData<std::u16string>(u"groupID", u"panda" + (GeneralUtils::to_u16string(target->GetObjectID())) + u";pandas")
|
||||
};
|
||||
info.settings.Insert<LWOOBJID>(u"tamer", target->GetObjectID());
|
||||
info.settings.Insert<std::u16string>(u"groupID", u"panda" + (GeneralUtils::to_u16string(target->GetObjectID())) + u";pandas");
|
||||
|
||||
auto* panda = Game::entityManager->CreateEntity(info);
|
||||
Game::entityManager->ConstructEntity(panda);
|
||||
|
||||
Reference in New Issue
Block a user