diff options
| author | Jude Melton-Houghton <jwmhjwmh@gmail.com> | 2022-10-09 10:50:26 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-09 10:50:26 -0400 |
| commit | 9676364c1fe5fe5eae69c55e7d7a45392decfb2d (patch) | |
| tree | b21c99ce54820b24bfef9028c39b01f28ed3c1ca /src/client/content_cso.cpp | |
| parent | 440d966b939059dfa51604eb68d61eecb12baeb4 (diff) | |
| download | minetest-9676364c1fe5fe5eae69c55e7d7a45392decfb2d.tar.xz | |
Optimize lighting calculation (#12797)
Diffstat (limited to 'src/client/content_cso.cpp')
| -rw-r--r-- | src/client/content_cso.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/content_cso.cpp b/src/client/content_cso.cpp index f9641afbe..50ae4e413 100644 --- a/src/client/content_cso.cpp +++ b/src/client/content_cso.cpp @@ -23,6 +23,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "clientenvironment.h" #include "client.h" #include "map.h" +#include "nodedef.h" class SmokePuffCSO: public ClientSimpleObject { @@ -50,7 +51,7 @@ public: bool pos_ok; MapNode n = env->getMap().getNode(floatToInt(pos, BS), &pos_ok); light = pos_ok ? decode_light(n.getLightBlend(env->getDayNightRatio(), - env->getGameDef()->ndef())) + env->getGameDef()->ndef()->getLightingFlags(n))) : 64; video::SColor color(255,light,light,light); m_spritenode->setColor(color); |
