-- if enemy polymorphs during scene we need to find and enable it after polymorph ends
local entity_x, entity_y = EntityGetTransform(GetUpdatedEntityID())

-- EntityGetParent check to prevent enabling enemies that are currently fucking
for _, enemy in ipairs(EntityGetInRadiusWithTag(entity_x, entity_y, 500, "enemy") or {}) do
	if ComponentGetIsEnabled(EntityGetFirstComponentIncludingDisabled(enemy, "ControlsComponent")) == false and EntityGetParent(enemy) == 0 then
		dofile_once("mods/lewd_noita/files/sex_logic/controls_toggle.lua")
		enable_entity(enemy)
	end
end