diff --git a/src/graphics/material.cpp b/src/graphics/material.cpp index 21776ff7d..15dac17ef 100644 --- a/src/graphics/material.cpp +++ b/src/graphics/material.cpp @@ -174,9 +174,12 @@ Material::Material(const XMLNode *node, bool deprecated) // backwards compatibility node->get("crash-reset-particles", &m_collision_particles); } + if (!m_collision_particles.empty()) + { + ParticleKindManager::get()->getParticles(m_collision_particles); + } } - s = ""; if (node->get("shader", &s)) { diff --git a/src/graphics/particle_kind.cpp b/src/graphics/particle_kind.cpp index d9043767a..3162bea81 100644 --- a/src/graphics/particle_kind.cpp +++ b/src/graphics/particle_kind.cpp @@ -200,6 +200,8 @@ ParticleKind::ParticleKind(const std::string &file) { material_manager->pushTempMaterial(materials, file); m_material_file = material_manager->getLatestMaterial()->getTexFname(); + // Preload textures + getMaterial(); } // ------------------------------------------------------------------------ diff --git a/src/main.cpp b/src/main.cpp index 6ba3173d0..9f8b27d8e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1461,8 +1461,6 @@ void initRest() race_manager->setTrack(UserConfigParams::m_last_track); - // Preload the explosion effects (explode.png) - ParticleKindManager::get()->getParticles("explosion.xml"); } // initRest //============================================================================= @@ -1564,6 +1562,9 @@ int main(int argc, char *argv[] ) main_loop = new MainLoop(); material_manager->loadMaterial(); + // Preload the explosion effects (explode.png) + ParticleKindManager::get()->getParticles("explosion.xml"); + GUIEngine::addLoadingIcon( irr_driver->getTexture(FileManager::GUI, "options_video.png")); kart_properties_manager -> loadAllKarts ();