From e3258b78e263c3f95007e1fbc92fcc3a51646f69 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 1 Dec 2012 23:54:15 +0200 Subject: Add setting preload_item_visuals --- src/client.cpp | 13 +++++++++++++ src/defaultsettings.cpp | 1 + 2 files changed, 14 insertions(+) (limited to 'src') diff --git a/src/client.cpp b/src/client.cpp index 3c69db076..c0c513fef 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -2464,6 +2464,19 @@ void Client::afterContentReceived() infostream<<"- Updating node textures"<updateTextures(m_tsrc); + // Preload item textures and meshes if configured to + if(g_settings->getBool("preload_item_visuals")) + { + verbosestream<<"Updating item textures and meshes"< names = m_itemdef->getAll(); + for(std::set::const_iterator + i = names.begin(); i != names.end(); ++i){ + // Asking for these caches the result + m_itemdef->getInventoryTexture(*i, this); + m_itemdef->getWieldMesh(*i, this); + } + } + // Start mesh update thread after setting up content definitions infostream<<"- Starting mesh update thread"<setDefault("anisotropic_filter", "false"); settings->setDefault("bilinear_filter", "false"); settings->setDefault("trilinear_filter", "false"); + settings->setDefault("preload_item_visuals", "false"); // Server stuff // "map-dir" doesn't exist by default. -- cgit v1.2.3