diff options
author | x2048 <codeforsmile@gmail.com> | 2022-05-20 22:33:52 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-20 22:33:52 +0200 |
commit | 604fb2b738c1f369c608b7f3b778034bf3dc2725 (patch) | |
tree | bbdcf4ef77af6f7058b115e3e4c24ab34e164988 /src/client/clientenvironment.cpp | |
parent | 273bfee9a193d0dd2e9f9b400add980c0b5202a7 (diff) | |
download | minetest-604fb2b738c1f369c608b7f3b778034bf3dc2725.tar.xz |
Fix lighting of the wield mesh (#12341)
* Assign node light to player before final color blend.
Fixes day/night lightbank ratio for wield meshes
* Update wield mesh light when changing mesh
Diffstat (limited to 'src/client/clientenvironment.cpp')
-rw-r--r-- | src/client/clientenvironment.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/client/clientenvironment.cpp b/src/client/clientenvironment.cpp index 448af36c6..183a95007 100644 --- a/src/client/clientenvironment.cpp +++ b/src/client/clientenvironment.cpp @@ -305,6 +305,7 @@ void ClientEnvironment::step(float dtime) node_at_lplayer = m_map->getNode(p); u16 light = getInteriorLight(node_at_lplayer, 0, m_client->ndef()); + lplayer->light_color = encode_light(light, 0); // this transfers light.alpha final_color_blend(&lplayer->light_color, light, day_night_ratio); } |