summaryrefslogtreecommitdiff
path: root/src/nodedef.h
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2016-01-23 19:53:27 -0800
committerest31 <MTest31@outlook.com>2016-02-10 00:10:51 +0100
commit47464c9344a1a4817ad6e4c6ec44526df305b1f6 (patch)
treea95e2f022ceaca4675e1f6e3cdcb30b030c7168c /src/nodedef.h
parentba8fa9e889b399d67f4e2172e7dbf7717fdc2b86 (diff)
downloadminetest-47464c9344a1a4817ad6e4c6ec44526df305b1f6.tar.gz
minetest-47464c9344a1a4817ad6e4c6ec44526df305b1f6.tar.bz2
minetest-47464c9344a1a4817ad6e4c6ec44526df305b1f6.zip
Fix backface culling when connecting to new servers.
Introduce a new contentfeatures version (8). When clients connect using v27 protocol version, they can assume that the tiledef.backface_culling is trustable, but if clients connect to servers providing contentfeatures version 7, then the v27 clients know that backface culling settings provided by the server in tiledefs are bogus for mesh, plantlike, firelike or liquid drawtype nodes. thanks to hmmmm, est31, nerzhul. Tested on new client - new server, new client - old server old client - new server.
Diffstat (limited to 'src/nodedef.h')
-rw-r--r--src/nodedef.h50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/nodedef.h b/src/nodedef.h
index 182bd09b2..db36021cf 100644
--- a/src/nodedef.h
+++ b/src/nodedef.h
@@ -104,6 +104,30 @@ struct NodeBox
struct MapNode;
class NodeMetadata;
+enum NodeDrawType
+{
+ NDT_NORMAL, // A basic solid block
+ NDT_AIRLIKE, // Nothing is drawn
+ NDT_LIQUID, // Do not draw face towards same kind of flowing/source liquid
+ NDT_FLOWINGLIQUID, // A very special kind of thing
+ NDT_GLASSLIKE, // Glass-like, don't draw faces towards other glass
+ NDT_ALLFACES, // Leaves-like, draw all faces no matter what
+ NDT_ALLFACES_OPTIONAL, // Fancy -> allfaces, fast -> normal
+ NDT_TORCHLIKE,
+ NDT_SIGNLIKE,
+ NDT_PLANTLIKE,
+ NDT_FENCELIKE,
+ NDT_RAILLIKE,
+ NDT_NODEBOX,
+ NDT_GLASSLIKE_FRAMED, // Glass-like, draw connected frames and all all
+ // visible faces
+ // uses 2 textures, one for frames, second for faces
+ NDT_FIRELIKE, // Draw faces slightly rotated and only on connecting nodes,
+ NDT_GLASSLIKE_FRAMED_OPTIONAL, // enabled -> connected, disabled -> Glass-like
+ // uses 2 textures, one for frames, second for faces
+ NDT_MESH, // Uses static meshes
+};
+
/*
Stand-alone definition of a TileSpec (basically a server-side TileSpec)
*/
@@ -137,31 +161,7 @@ struct TileDef
}
void serialize(std::ostream &os, u16 protocol_version) const;
- void deSerialize(std::istream &is, bool culling_ignore);
-};
-
-enum NodeDrawType
-{
- NDT_NORMAL, // A basic solid block
- NDT_AIRLIKE, // Nothing is drawn
- NDT_LIQUID, // Do not draw face towards same kind of flowing/source liquid
- NDT_FLOWINGLIQUID, // A very special kind of thing
- NDT_GLASSLIKE, // Glass-like, don't draw faces towards other glass
- NDT_ALLFACES, // Leaves-like, draw all faces no matter what
- NDT_ALLFACES_OPTIONAL, // Fancy -> allfaces, fast -> normal
- NDT_TORCHLIKE,
- NDT_SIGNLIKE,
- NDT_PLANTLIKE,
- NDT_FENCELIKE,
- NDT_RAILLIKE,
- NDT_NODEBOX,
- NDT_GLASSLIKE_FRAMED, // Glass-like, draw connected frames and all all
- // visible faces
- // uses 2 textures, one for frames, second for faces
- NDT_FIRELIKE, // Draw faces slightly rotated and only on connecting nodes,
- NDT_GLASSLIKE_FRAMED_OPTIONAL, // enabled -> connected, disabled -> Glass-like
- // uses 2 textures, one for frames, second for faces
- NDT_MESH, // Uses static meshes
+ void deSerialize(std::istream &is, const u8 contentfeatures_version, const NodeDrawType drawtype);
};
#define CF_SPECIAL_COUNT 6