Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add setting enable_on_demand_item_visuals

  • Loading branch information...
commit 67369459aff9b408da9bb632703d4ed23fa51eb6 1 parent 48121d4
@celeron55 authored
View
7 minetest.conf.example
@@ -126,6 +126,13 @@
#sound_volume = 0.7
# Whether node texture animations should be desynchronized per MapBlock
#desynchronize_mapblock_texture_animation = true
+# Texture filtering settings
+#mip_map = false
+#anisotropic_filter = false
+#bilinear_filter = false
+#trilinear_filter = false
+# Set to false to pre-generate all item visuals
+#enable_on_demand_item_visuals = true
#
# Server stuff
View
13 src/client.cpp
@@ -2464,6 +2464,19 @@ void Client::afterContentReceived()
infostream<<"- Updating node textures"<<std::endl;
m_nodedef->updateTextures(m_tsrc);
+ // Update item textures and meshes if configured to
+ if(g_settings->getBool("enable_on_demand_item_visuals") == false)
+ {
+ verbosestream<<"Updating item textures and meshes"<<std::endl;
+ std::set<std::string> names = m_itemdef->getAll();
+ for(std::set<std::string>::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"<<std::endl;
m_mesh_update_thread.Start();
View
1  src/defaultsettings.cpp
@@ -110,6 +110,7 @@ void set_default_settings(Settings *settings)
settings->setDefault("anisotropic_filter", "false");
settings->setDefault("bilinear_filter", "false");
settings->setDefault("trilinear_filter", "false");
+ settings->setDefault("enable_on_demand_item_visuals", "true");
// Server stuff
// "map-dir" doesn't exist by default.
Please sign in to comment.
Something went wrong with that request. Please try again.