mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
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
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user