mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Optimize lighting calculation (#12797)
This commit is contained in:
parent
440d966b93
commit
9676364c1f
18 changed files with 188 additions and 220 deletions
|
@ -265,7 +265,8 @@ void Particle::updateLight()
|
|||
);
|
||||
MapNode n = m_env->getClientMap().getNode(p, &pos_ok);
|
||||
if (pos_ok)
|
||||
light = n.getLightBlend(m_env->getDayNightRatio(), m_gamedef->ndef());
|
||||
light = n.getLightBlend(m_env->getDayNightRatio(),
|
||||
m_gamedef->ndef()->getLightingFlags(n));
|
||||
else
|
||||
light = blend_light(m_env->getDayNightRatio(), LIGHT_SUN, 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue