]> git.lizzy.rs Git - minetest.git/commit
* refactored liquid transformation code (has some flaws)
authorFelix Krause <flyx@isobeef.org>
Sat, 16 Jul 2011 14:01:37 +0000 (16:01 +0200)
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>
Mon, 18 Jul 2011 00:37:19 +0000 (02:37 +0200)
commitdef870953a9d964749cbd8fcfc050f69a0c8e53f
treedf1d948f54f11721ec909102fb1a7e7b5b23da06
parentf2c633050547964786c027590c423efd7ed34a95
* 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.
src/content_mapblock.cpp
src/map.cpp
src/mapnode.h