Skip to content

Commit

Permalink
GenericCAO: Fix glow not working since a08d18a
Browse files Browse the repository at this point in the history
  • Loading branch information
SmallJoker committed Jun 7, 2020
1 parent e746607 commit 8fc9e7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/client/content_cao.cpp
Expand Up @@ -787,6 +787,9 @@ void GenericCAO::addToScene(ITextureSource *tsrc)

void GenericCAO::updateLight(u32 day_night_ratio)
{
if (m_glow < 0)
return;

u8 light_at_pos = 0;
bool pos_ok;

Expand All @@ -797,7 +800,7 @@ void GenericCAO::updateLight(u32 day_night_ratio)
else
light_at_pos = blend_light(day_night_ratio, LIGHT_SUN, 0);

u8 light = decode_light(light_at_pos);
u8 light = decode_light(light_at_pos + m_glow);
if (light != m_last_light) {
m_last_light = light;
setNodeLight(light);
Expand Down

0 comments on commit 8fc9e7e

Please sign in to comment.