From 604fb2b738c1f369c608b7f3b778034bf3dc2725 Mon Sep 17 00:00:00 2001 From: x2048 Date: Fri, 20 May 2022 22:33:52 +0200 Subject: 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 --- src/client/clientenvironment.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/client/clientenvironment.cpp') 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); } -- cgit v1.2.3