diff options
author | Dániel Juhász <juhdanad@gmail.com> | 2016-12-10 19:02:44 +0100 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-03-11 02:06:18 +0000 |
commit | ab371cc93491baf0973ecc94b96c3a1fdb4abfd5 (patch) | |
tree | ea9eedcef115258714163ef3927a095847c35d7b /src/mg_schematic.h | |
parent | d785456b3fa35faf47cb972fde9e8668382c5e22 (diff) | |
download | hax-minetest-server-ab371cc93491baf0973ecc94b96c3a1fdb4abfd5.tar.gz hax-minetest-server-ab371cc93491baf0973ecc94b96c3a1fdb4abfd5.zip |
Light calculation: New bulk node lighting code
This commit introduces a new bulk node lighting algorithm to minimize
lighting bugs during l-system tree generation, schematic placement and
non-mapgen-object lua voxelmanip light calculation.
If the block above the changed area is not loaded, it gets loaded to avoid
lighting bugs.
Light is updated as soon as write_to_map is called on a voxel manipulator,
therefore update_map does nothing.
Diffstat (limited to '')
-rw-r--r-- | src/mg_schematic.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mg_schematic.h b/src/mg_schematic.h index 1d46e6ac4..2f60c843b 100644 --- a/src/mg_schematic.h +++ b/src/mg_schematic.h @@ -25,6 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/string.h" class Map; +class ServerMap; class Mapgen; class MMVManip; class PseudoRandom; @@ -108,7 +109,7 @@ public: void blitToVManip(MMVManip *vm, v3s16 p, Rotation rot, bool force_place); bool placeOnVManip(MMVManip *vm, v3s16 p, u32 flags, Rotation rot, bool force_place); - void placeOnMap(Map *map, v3s16 p, u32 flags, Rotation rot, bool force_place); + void placeOnMap(ServerMap *map, v3s16 p, u32 flags, Rotation rot, bool force_place); void applyProbabilities(v3s16 p0, std::vector<std::pair<v3s16, u8> > *plist, |