]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mapnode.h
map unloading is now a whole lot better
[dragonfireclient.git] / src / mapnode.h
index aa3fa39608b4f1e88ccb99129b6376172c7ecca9..d975a50c46fb0bf83740b6075c652e56ff8adc39 100644 (file)
@@ -648,7 +648,24 @@ struct MapNode
        }
 };
 
+/*
+       Gets lighting value at face of node
+       
+       Parameters must consist of air and !air.
+       Order doesn't matter.
 
+       If either of the nodes doesn't exist, light is 0.
+       
+       parameters:
+               daynight_ratio: 0...1000
+               n: getNodeParent(p)
+               n2: getNodeParent(p + face_dir)
+               face_dir: axis oriented unit vector from p to p2
+       
+       returns encoded light value.
+*/
+u8 getFaceLight(u32 daynight_ratio, MapNode n, MapNode n2,
+               v3s16 face_dir);
 
 #endif