diff --git a/radiantcore/entity/EntityNode.cpp b/radiantcore/entity/EntityNode.cpp index 202847fe05..5a083df99c 100644 --- a/radiantcore/entity/EntityNode.cpp +++ b/radiantcore/entity/EntityNode.cpp @@ -223,19 +223,26 @@ std::size_t EntityNode::getFingerprint() math::combineHash(hash, std::hash()(pair.second)); } - // Entities need to include any child hashes + // Entities need to include any child hashes, but be insensitive to their order + std::set childFingerprints; + foreachNode([&](const scene::INodePtr& child) { auto comparable = std::dynamic_pointer_cast(child); if (comparable) { - math::combineHash(hash, comparable->getFingerprint()); + childFingerprints.insert(comparable->getFingerprint()); } return true; }); + for (auto childFingerprint : childFingerprints) + { + math::combineHash(hash, childFingerprint); + } + return hash; }