diff options
author | MillersMan <MillersMan@users.noreply.github.com> | 2016-06-05 01:30:36 +0200 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2016-06-04 19:32:54 -0400 |
commit | 7841f1c5098d73b7538623cf898ca1e32ac6773d (patch) | |
tree | 96d25591bce8157fc11b3babdeee8292877e6da5 /src/mapgen.h | |
parent | 109c7e334920f859068aeda31463f644e6b69895 (diff) | |
download | minetest-7841f1c5098d73b7538623cf898ca1e32ac6773d.tar.gz minetest-7841f1c5098d73b7538623cf898ca1e32ac6773d.tar.bz2 minetest-7841f1c5098d73b7538623cf898ca1e32ac6773d.zip |
Mapgen: Performance improvement and fixes for updateLiquid (#4065)
- Adds only ~100 nodes per chunk to trans_liquid with similar processing time
- Adds liquid nodes themselves instead of potential solid nodes below them
- CONTENT_IGNORE nodes are interpreted as if they continue their neighborhood
- This allows liquid columns to span multiple chunks without being interrupted
- NOTE: Expects an one-node border in generation chunk without liquid changes
Diffstat (limited to 'src/mapgen.h')
-rw-r--r-- | src/mapgen.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mapgen.h b/src/mapgen.h index f673007b5..90ac84bd8 100644 --- a/src/mapgen.h +++ b/src/mapgen.h @@ -199,6 +199,10 @@ public: virtual int getSpawnLevelAtPoint(v2s16 p) { return 0; } private: + // isLiquidHorizontallyFlowable() is a helper function for updateLiquid() + // that checks whether there are floodable nodes without liquid beneath + // the node at index vi. + inline bool isLiquidHorizontallyFlowable(u32 vi, v3s16 em); DISABLE_CLASS_COPY(Mapgen); }; |