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.
This commit is contained in:
RiZom-91 2014-10-20 20:23:30 +02:00
parent b11e1db809
commit fc8fedf7c7
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}