diff options
author | number Zero <silverunicorn2011@yandex.ru> | 2017-05-11 23:24:12 +0300 |
---|---|---|
committer | paramat <mat.gregory@virginmedia.com> | 2017-07-11 01:02:22 +0100 |
commit | ef285b2815962a7a01791059ed984cb12fdba4dd (patch) | |
tree | c004c7033590c15532ac4c66ac818b86ebc1f91f /src/content_mapblock.h | |
parent | f871852f13db6072b3bffe25826d7520ef031ec0 (diff) | |
download | minetest-ef285b2815962a7a01791059ed984cb12fdba4dd.tar.gz minetest-ef285b2815962a7a01791059ed984cb12fdba4dd.tar.bz2 minetest-ef285b2815962a7a01791059ed984cb12fdba4dd.zip |
Add 'plantlike_rooted' drawtype
Useful for underwater plants.
Node consists of a base cube plus a plantlike extension that can pass through
liquid nodes above without creating air bubbles or interfering with liquid flow.
Uses paramtype2 'leveled', param2 defines height of plantlike extension.
Diffstat (limited to 'src/content_mapblock.h')
-rw-r--r-- | src/content_mapblock.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/content_mapblock.h b/src/content_mapblock.h index 0a0b12a80..51c5fc6ea 100644 --- a/src/content_mapblock.h +++ b/src/content_mapblock.h @@ -62,12 +62,14 @@ public: video::SColor blendLightColor(const v3f &vertex_pos); video::SColor blendLightColor(const v3f &vertex_pos, const v3f &vertex_normal); - void useTile(int index, bool disable_backface_culling); - void useDefaultTile(bool set_color = true); - void getTile(const v3s16 &direction, TileSpec &tile); + void useTile(int index = 0, u8 set_flags = MATERIAL_FLAG_CRACK_OVERLAY, + u8 reset_flags = 0, bool special = false); + void getTile(v3s16 direction, TileSpec *tile); + void getSpecialTile(int index, TileSpec *tile, bool apply_crack = false); // face drawing - void drawQuad(v3f *vertices, const v3s16 &normal = v3s16(0, 0, 0)); + void drawQuad(v3f *vertices, const v3s16 &normal = v3s16(0, 0, 0), + float vertical_tiling = 1.0); // cuboid drawing! void drawCuboid(const aabb3f &box, TileSpec *tiles, int tilecount, @@ -111,9 +113,11 @@ public: int rotate_degree; bool random_offset_Y; int face_num; + float plant_height; void drawPlantlikeQuad(float rotation, float quad_offset = 0, bool offset_top_only = false); + void drawPlantlike(); // firelike-specific void drawFirelikeQuad(float rotation, float opening_angle, @@ -127,6 +131,7 @@ public: void drawTorchlikeNode(); void drawSignlikeNode(); void drawPlantlikeNode(); + void drawPlantlikeRootedNode(); void drawFirelikeNode(); void drawFencelikeNode(); void drawRaillikeNode(); |