diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-11-30 15:35:03 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-11-30 15:35:03 +0200 |
commit | 38353751c9f4e03fb6a0b855e6d8b5691af71dc0 (patch) | |
tree | fb3b6b96b37704382560ed735d26099338853bae /src/mapnode.h | |
parent | 4a8973aeac1d44b78e44efde113e5c47bb3a803b (diff) | |
download | minetest-38353751c9f4e03fb6a0b855e6d8b5691af71dc0.tar.gz minetest-38353751c9f4e03fb6a0b855e6d8b5691af71dc0.tar.bz2 minetest-38353751c9f4e03fb6a0b855e6d8b5691af71dc0.zip |
better water
Diffstat (limited to 'src/mapnode.h')
-rw-r--r-- | src/mapnode.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/mapnode.h b/src/mapnode.h index 910239136..789cedb27 100644 --- a/src/mapnode.h +++ b/src/mapnode.h @@ -133,6 +133,34 @@ inline u8 material_solidness(u8 m) return 2; } +// Objects collide with walkable materials +inline bool material_walkable(u8 m) +{ + return (m != MATERIAL_AIR && m != MATERIAL_WATER); +} + +// A liquid resists fast movement +inline bool material_liquid(u8 m) +{ + return (m == MATERIAL_WATER); +} + +// Pointable materials can be pointed to in the map +inline bool material_pointable(u8 m) +{ + return (m != MATERIAL_AIR && m != MATERIAL_WATER); +} + +inline bool material_diggable(u8 m) +{ + return (m != MATERIAL_AIR && m != MATERIAL_WATER); +} + +inline bool material_buildable_to(u8 m) +{ + return (m == MATERIAL_AIR || m == MATERIAL_WATER); +} + /* Nodes make a face if materials differ and solidness differs. Return value: |