mirror of
https://github.com/minetest/minetest.git
synced 2025-07-03 00:20:21 +02:00
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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user