CNode *CDefaultPartitioner::removeNode(const int id) { ENodeType type; CNode *current; CNode *node = CPartitioner::removeNode(id); if(node) { type = node->getType(); if(type & PROP_BIT) { for(std::vector<CPropNode *>::iterator it = m_visiblePropNodes.begin(); it != m_visiblePropNodes.end(); it++) { current = *it; if(current && current->getId() == id) { m_visiblePropNodes.erase(it); break; } } } else if(type & LOGIC_BIT) { for(std::vector<CLogicNode *>::iterator it = m_visibleLogicNodes.begin(); it != m_visibleLogicNodes.end(); it++) { current = *it; if(current && current->getId() == id) { m_visibleLogicNodes.erase(it); break; } } } else if(type == ENT_LIGHT) { for(std::vector<CLightNode *>::iterator it = m_visibleLightNodes.begin(); it != m_visibleLightNodes.end(); it++) { current = *it; if(current && current->getId() == id) { m_visibleLightNodes.erase(it); break; } } } else if(type == ENT_MAP) { for(std::vector<CMapNode *>::iterator it = m_visibleMapNodes.begin(); it != m_visibleMapNodes.end(); it++) { current = *it; if(current && current->getId() == id) { m_visibleMapNodes.erase(it); break; } } } } return node; }