From 1c8f783be6b783f3b720aed279ade109a121346d Mon Sep 17 00:00:00 2001 From: HifiExperiments Date: Wed, 22 Jul 2020 14:38:33 -0700 Subject: [PATCH] try to fix renderWithZones from JSON --- libraries/entities/src/EntityTree.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index 049a4b6229..e6f5e36202 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -2793,6 +2793,17 @@ bool EntityTree::sendEntitiesOperation(const OctreeElementPointer& element, void } } + QVector oldRenderWithZones = properties.getRenderWithZones(); + if (!oldRenderWithZones.isEmpty()) { + QVector newRenderWithZones; + for (QUuid oldRenderWithZoneID : oldRenderWithZones) { + if (args->ourTree->findEntityByEntityItemID(oldRenderWithZoneID)) { + newRenderWithZones.append(getMapped(oldRenderWithZoneID)); + } + } + properties.setRenderWithZones(newRenderWithZones); + } + properties.setXNNeighborID(getMapped(properties.getXNNeighborID())); properties.setXPNeighborID(getMapped(properties.getXPNeighborID())); properties.setYNNeighborID(getMapped(properties.getYNNeighborID()));