mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
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
This commit is contained in:
parent
ef779b0ab6
commit
735e3b7059
3 changed files with 31 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue