summaryrefslogtreecommitdiff
path: root/src/mapnode.h
diff options
context:
space:
mode:
authorFelix Krause <flyx@isobeef.org>2011-07-16 16:01:37 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-18 02:37:19 +0200
commitf1e8ff22459bcd4fdbbe855a031d29744640ea99 (patch)
tree8e28b776a816e7ab5646da249129059d24816bc8 /src/mapnode.h
parent2586a186bd0e05d7c746e1b316f23ee0866bfa74 (diff)
downloadminetest-f1e8ff22459bcd4fdbbe855a031d29744640ea99.tar.gz
minetest-f1e8ff22459bcd4fdbbe855a031d29744640ea99.tar.bz2
minetest-f1e8ff22459bcd4fdbbe855a031d29744640ea99.zip
* 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.
Diffstat (limited to 'src/mapnode.h')
-rw-r--r--src/mapnode.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mapnode.h b/src/mapnode.h
index 8bbd4eb79..33128049a 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -405,9 +405,16 @@ enum LightBank
};
/*
+ 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
{
/*