1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fixes and improvements

This commit is contained in:
Gregor Parzefall 2023-07-01 10:00:24 +02:00 committed by sfan5
parent 7473e4cafd
commit 6f0d36c41a
11 changed files with 38 additions and 38 deletions

View file

@ -113,7 +113,7 @@ void ShadowRenderer::disable()
}
for (auto node : m_shadow_node_array)
node.node->forEachMaterial([] (video::SMaterial &mat) {
node.node->forEachMaterial([] (auto &mat) {
mat.setTexture(TEXTURE_LAYER_SHADOW, nullptr);
});
}
@ -185,14 +185,14 @@ void ShadowRenderer::addNodeToShadowList(
// node should never be ClientMap
assert(strcmp(node->getName(), "ClientMap") != 0);
node->forEachMaterial([this] (video::SMaterial &mat) {
node->forEachMaterial([this] (auto &mat) {
mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal);
});
}
void ShadowRenderer::removeNodeFromShadowList(scene::ISceneNode *node)
{
node->forEachMaterial([] (video::SMaterial &mat) {
node->forEachMaterial([] (auto &mat) {
mat.setTexture(TEXTURE_LAYER_SHADOW, nullptr);
});
for (auto it = m_shadow_node_array.begin(); it != m_shadow_node_array.end();) {
@ -264,7 +264,7 @@ void ShadowRenderer::updateSMTextures()
assert(shadowMapTextureFinal != nullptr);
for (auto &node : m_shadow_node_array)
node.node->forEachMaterial([this] (video::SMaterial &mat) {
node.node->forEachMaterial([this] (auto &mat) {
mat.setTexture(TEXTURE_LAYER_SHADOW, shadowMapTextureFinal);
});
}