1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Generalize mesh chunking, and make it configurable. (#13179)

* Generalize mesh chunking. Set 3x3x3 chunks.

* Make mesh chunk size configurable... Default to 1 (off).

* Extract all mesh grid maths into a dedicated class

---------

Co-authored-by: x2048 <codeforsmile@gmail.com>
This commit is contained in:
lhofhansl 2023-02-08 13:42:12 -08:00 committed by GitHub
parent 56d2567b5d
commit d3a6ee00e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 116 additions and 116 deletions

View file

@ -39,6 +39,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "network/peerhandler.h"
#include "gameparams.h"
#include <fstream>
#include "util/numeric.h"
#define CLIENT_CHAT_MESSAGE_LIMIT_PER_10S 10.0f
@ -437,6 +438,11 @@ public:
{
return m_env.getLocalPlayer()->formspec_prepend;
}
inline MeshGrid getMeshGrid()
{
return m_mesh_grid;
}
private:
void loadMods();
@ -602,4 +608,7 @@ private:
u32 m_csm_restriction_noderange = 8;
std::unique_ptr<ModChannelMgr> m_modchannel_mgr;
// The number of blocks the client will combine for mesh generation.
MeshGrid m_mesh_grid;
};