mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
* refactored liquid transformation code (has some flaws)
Completely rewrote the liquid transformation. The algorithm now exclusively modifies the current node in one iteration. Another change is that MapNode.param2 now stores a bit that tells other nodes if a flowing liquid node flows downwards. This is accomplished by two masks on param2 for the "flow down" bit and the "liquid level" bits. This will be the base of future improvements to the liquid flow. However, in the current state flowing liquid does not always disappear when cut off its source. Be aware that this branch is work in progress.
This commit is contained in:
parent
2586a186bd
commit
f1e8ff2245
3 changed files with 218 additions and 262 deletions
|
@ -404,10 +404,17 @@ enum LightBank
|
|||
LIGHTBANK_NIGHT
|
||||
};
|
||||
|
||||
/*
|
||||
Masks for MapNode.param2 of flowing liquids
|
||||
*/
|
||||
#define LIQUID_LEVEL_MASK 0x07
|
||||
#define LIQUID_FLOW_DOWN_MASK 0x08
|
||||
|
||||
/*
|
||||
This is the stuff what the whole world consists of.
|
||||
*/
|
||||
|
||||
|
||||
struct MapNode
|
||||
{
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue