Support absent scene node names (#14330)

Contains a hack to support IrrlichtMT revision 14 for now (until we release revision 15)
This commit is contained in:
Lars Müller 2024-02-18 11:39:16 +01:00 committed by GitHub
parent 1e316a9704
commit 4acbd59162
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -183,8 +183,12 @@ void ShadowRenderer::addNodeToShadowList(
{ {
m_shadow_node_array.emplace_back(node, shadowMode); m_shadow_node_array.emplace_back(node, shadowMode);
// node should never be ClientMap // node should never be ClientMap
#if IRRLICHT_VERSION_MT_REVISION >= 15
assert(!node->getName().has_value() || *node->getName() != "ClientMap");
#else
// TODO: Remove this as soon as we require 1.9.0mt15
assert(strcmp(node->getName(), "ClientMap") != 0); assert(strcmp(node->getName(), "ClientMap") != 0);
#endif
node->forEachMaterial([this] (auto &mat) { node->forEachMaterial([this] (auto &mat) {
mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal); mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal);
}); });