aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-04-25 11:55:40 +0300
committerPerttu Ahola <celeron55@gmail.com>2011-04-25 11:55:40 +0300
commit42fb1ba676de762b033b943c4a2d82db6229d245 (patch)
treedb6bfd5bb107fa4d73e5b9784df5107481b1339b
parent041b5e54797f03a22bd96153b8d232630c71592a (diff)
downloadminetest-42fb1ba676de762b033b943c4a2d82db6229d245.tar.gz
minetest-42fb1ba676de762b033b943c4a2d82db6229d245.tar.bz2
minetest-42fb1ba676de762b033b943c4a2d82db6229d245.zip
Set oerkki1 to not be drawn in completely dark
-rw-r--r--src/clientobject.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/clientobject.cpp b/src/clientobject.cpp
index f7e6e051d..9e4bf757c 100644
--- a/src/clientobject.cpp
+++ b/src/clientobject.cpp
@@ -632,6 +632,14 @@ void Oerkki1CAO::updateLight(u8 light_at_pos)
{
if(m_node == NULL)
return;
+
+ if(light_at_pos <= 2)
+ {
+ m_node->setVisible(false);
+ return;
+ }
+
+ m_node->setVisible(true);
u8 li = decode_light(light_at_pos);
video::SColor color(255,li,li,li);