From 4acbd5916262196ce090a81123c8803d9c54b396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20M=C3=BCller?= <34514239+appgurueu@users.noreply.github.com> Date: Sun, 18 Feb 2024 11:39:16 +0100 Subject: [PATCH] Support absent scene node names (#14330) Contains a hack to support IrrlichtMT revision 14 for now (until we release revision 15) --- src/client/shadows/dynamicshadowsrender.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client/shadows/dynamicshadowsrender.cpp b/src/client/shadows/dynamicshadowsrender.cpp index ce3fdfc6d..f88b0fa3b 100644 --- a/src/client/shadows/dynamicshadowsrender.cpp +++ b/src/client/shadows/dynamicshadowsrender.cpp @@ -183,8 +183,12 @@ void ShadowRenderer::addNodeToShadowList( { m_shadow_node_array.emplace_back(node, shadowMode); // 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); - +#endif node->forEachMaterial([this] (auto &mat) { mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal); });