From 7841f1c5098d73b7538623cf898ca1e32ac6773d Mon Sep 17 00:00:00 2001 From: MillersMan Date: Sun, 5 Jun 2016 01:30:36 +0200 Subject: 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 --- src/mapgen.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mapgen.h') 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); }; -- cgit v1.2.3