1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Move client code out of ItemDefManager (#15967)

This commit is contained in:
cx384 2025-04-04 18:58:14 +02:00 committed by GitHub
parent a6d4cd7c15
commit 52b974184d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 195 additions and 163 deletions

View file

@ -53,6 +53,7 @@
#include "translation.h"
#include "content/mod_configuration.h"
#include "mapnode.h"
#include "item_visuals_manager.h"
extern gui::IGUIEnvironment* guienv;
@ -95,6 +96,7 @@ Client::Client(
ISoundManager *sound,
MtEventManager *event,
RenderingEngine *rendering_engine,
ItemVisualsManager *item_visuals_manager,
ELoginRegister allow_login_or_register
):
m_tsrc(tsrc),
@ -104,6 +106,7 @@ Client::Client(
m_sound(sound),
m_event(event),
m_rendering_engine(rendering_engine),
m_item_visuals_manager(item_visuals_manager),
m_mesh_update_manager(std::make_unique<MeshUpdateManager>(this)),
m_env(
make_irr<ClientMap>(this, rendering_engine, control, 666),
@ -346,6 +349,8 @@ Client::~Client()
// cleanup 3d model meshes on client shutdown
m_rendering_engine->cleanupMeshCache();
m_item_visuals_manager->clear();
guiScalingCacheClear();
delete m_minimap;