Don't create collision particles in no graphics STK

This commit is contained in:
Benau 2020-02-20 08:57:29 +08:00
parent e01381c508
commit 13df4ee83a

View File

@ -2384,7 +2384,8 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
{
#ifndef SERVER_ONLY
std::string particles = m->getCrashResetParticles();
if (particles.size() > 0 && UserConfigParams::m_particles_effects > 0)
if (!GUIEngine::isNoGraphics() &&
particles.size() > 0 && UserConfigParams::m_particles_effects > 0)
{
ParticleKind* kind =
ParticleKindManager::get()->getParticles(particles);