From fc8fedf7c77b1af9d357bd92526b914beb0d237f Mon Sep 17 00:00:00 2001 From: RiZom-91 Date: Mon, 20 Oct 2014 20:23:30 +0200 Subject: [PATCH] line_of_sight: Add the sunlight.propagates condition Add the sunlight.propagates condition in the line_of_sight function. If the sun light can pass through a node then it should also be possible to see through it. --- src/environment.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/environment.cpp b/src/environment.cpp index 8977ee673..fcc370b2d 100644 --- a/src/environment.cpp +++ b/src/environment.cpp @@ -405,7 +405,7 @@ bool ServerEnvironment::line_of_sight(v3f pos1, v3f pos2, float stepsize, v3s16 MapNode n = getMap().getNodeNoEx(pos); - if(n.param0 != CONTENT_AIR) { + if(n.param0 != CONTENT_AIR && m_gamedef->ndef()->get(n).sunlight_propagates == false) { if (p) { *p = pos; }