From 5e0c284f3a8debdd9ebb080f80e36dceb7bc4ce2 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Wed, 1 Dec 2010 15:20:12 +0200 Subject: some work-in-progress water stuff --- src/mapnode.h | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'src/mapnode.h') diff --git a/src/mapnode.h b/src/mapnode.h index 789cedb27..02abe4e52 100644 --- a/src/mapnode.h +++ b/src/mapnode.h @@ -35,9 +35,6 @@ with this program; if not, write to the Free Software Foundation, Inc., /* Ignored node. - param is used for custom information in special containers, - like VoxelManipulator. - Anything that stores MapNodes doesn't have to preserve parameters associated with this material. @@ -67,27 +64,12 @@ enum Material MATERIAL_GRASS, - /* - For water, the param is water pressure. 0...127. - TODO: No, at least the lowest nibble is used for lighting. - - - Water will be a bit like light, but with different flow - behavior. - - Water blocks will fall down if there is empty space below. - - If there is water below, the pressure of the block below is - the pressure of the current block + 1, or higher. - - If there is any pressure in a horizontally neighboring - block, a water block will try to move away from it. - - If there is >=2 of pressure in a block below, water will - try to move upwards. - - NOTE: To keep large operations fast, we have to keep a - cache of the water-air-surfaces, just like with light - */ MATERIAL_WATER, MATERIAL_LIGHT, MATERIAL_TREE, + MATERIAL_LEAVES, MATERIAL_GRASS_FOOTSTEPS, @@ -216,6 +198,8 @@ struct MapNode */ s8 param; + u8 pressure; + MapNode(const MapNode & n) { *this = n; -- cgit v1.2.3