Skip to content

Commit

Permalink
#6138: Notify attachment entities about changed render settings
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Oct 26, 2022
1 parent 5d8b165 commit 62da7c0
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions radiantcore/entity/EntityNode.cpp
Expand Up @@ -596,6 +596,15 @@ void EntityNode::onEntitySettingsChanged()
{
_renderableName.clear();
}

// Notify all attached entities
foreachAttachment([](const IEntityNodePtr& node)
{
if (auto attachedEntity = std::dynamic_pointer_cast<EntityNode>(node); attachedEntity)
{
attachedEntity->onEntitySettingsChanged();
}
});
}

void EntityNode::attachToRenderSystem()
Expand Down

0 comments on commit 62da7c0

Please sign in to comment.