summaryrefslogtreecommitdiff
path: root/src/nodedef.h
diff options
context:
space:
mode:
authorAuke Kok <sofar@foo-projects.org>2016-01-21 14:40:24 -0800
committerest31 <MTest31@outlook.com>2016-01-23 16:33:24 +0100
commit735e3b70596e16d04de1edcd878deec3c539c6ed (patch)
treed83b056ed67845d9fd484304799d72ff4ecddb0d /src/nodedef.h
parentef779b0ab6d7460fe074d8b2eda05864c822d905 (diff)
downloadminetest-735e3b70596e16d04de1edcd878deec3c539c6ed.tar.gz
minetest-735e3b70596e16d04de1edcd878deec3c539c6ed.tar.bz2
minetest-735e3b70596e16d04de1edcd878deec3c539c6ed.zip
Backface culling: Ignore setting in tiledef from old servers.
Outdated servers are always sending tiledefs with culling enabled no matter what, as the value was previously entirely ignored. To compensate, we must (1) detect that we're running against an old server with a new client, and (2) disable culling for mesh, plantlike, firelike and liquid draw types no matter what the server is telling us. In order to achieve this, we need to bump the protocol version since we cannot rely on the tiledef version, and test for it being older. I've bumped the protocol version, although that should have likely happened in the actual change that introduced the new backface_culling PR #3578. Fortunately that's only 2 commits back at this point. We also explicitly test for the drawtype to assure we are not changing the culling value for other nodes, where it should remain enabled. This was tested against various pub servers, including 0.4.13 and 0.4.12. Fixes #3598
Diffstat (limited to 'src/nodedef.h')
-rw-r--r--src/nodedef.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nodedef.h b/src/nodedef.h
index 8f4942c04..182bd09b2 100644
--- a/src/nodedef.h
+++ b/src/nodedef.h
@@ -137,7 +137,7 @@ struct TileDef
}
void serialize(std::ostream &os, u16 protocol_version) const;
- void deSerialize(std::istream &is);
+ void deSerialize(std::istream &is, bool culling_ignore);
};
enum NodeDrawType