fix: destroy enemies on entering build mode (#1812)

This commit is contained in:
David Markowitz
2025-06-08 19:41:19 -07:00
committed by GitHub
parent 37e14979a4
commit 2858345269
2 changed files with 11 additions and 1 deletions

View File

@@ -111,7 +111,9 @@ void Strip::Spawn(LOT lot, Entity& entity) {
info.pos = entity.GetPosition();
info.rot = NiQuaternionConstant::IDENTITY;
info.spawnerID = entity.GetObjectID();
Game::entityManager->ConstructEntity(Game::entityManager->CreateEntity(info, nullptr, &entity));
auto* const spawnedEntity = Game::entityManager->CreateEntity(info, nullptr, &entity);
spawnedEntity->AddToGroup("SpawnedPropertyEnemies");
Game::entityManager->ConstructEntity(spawnedEntity);
}
// Spawns a specific drop for all