Remove CameraBoundComponent from entites

This commit is contained in:
David Vogel 2022-07-19 18:27:31 +02:00
parent 9f4aa9b038
commit 6cf06d42d9

View File

@ -42,6 +42,7 @@ local componentTypeNamesToDisable = {
"CharacterPlatformingComponent", "CharacterPlatformingComponent",
"WormComponent", "WormComponent",
"WormAIComponent", "WormAIComponent",
"CameraBoundComponent", -- Disabling this component will prevent entites from being killed/reset when they go offscreen. If they are reset, the "MapCaptured" tag will be gone and we capture these entities multiple times. This has some side effects, like longleg.xml and zombie_weak.xml will respawn every revisit, as the spawner doesn't get deleted.
--"PhysicsBodyCollisionDamageComponent", --"PhysicsBodyCollisionDamageComponent",
--"ExplodeOnDamageComponent", --"ExplodeOnDamageComponent",
--"DamageModelComponent", --"DamageModelComponent",
@ -83,7 +84,7 @@ local function captureEntities(entityFile, x, y, radius)
local rootEntity = entity:GetRootEntity() local rootEntity = entity:GetRootEntity()
-- Make sure to only export entities when they are encountered the first time. -- Make sure to only export entities when they are encountered the first time.
if not rootEntity:HasTag("MapCaptured") then if not rootEntity:HasTag("MapCaptured") then
--print(rootEntity:GetFilename()) --print(rootEntity:GetFilename(), "got captured!")
-- Some hacky way to generate valid JSON that doesn't break when the game crashes. -- Some hacky way to generate valid JSON that doesn't break when the game crashes.
-- Well, as long as it does not crash between write and flush. -- Well, as long as it does not crash between write and flush.