Fix crashed sound repeating

This commit is contained in:
Benau 2018-04-22 14:44:43 +08:00
parent 7ddd498156
commit d4eaec6667

View File

@ -2265,7 +2265,7 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
void Kart::playCrashSFX(const Material* m, AbstractKart *k)
{
int ticks_since_start = World::getWorld()->getTicksSinceStart();
if(ticks_since_start-m_ticks_last_crash < 0.5f) return;
if(ticks_since_start-m_ticks_last_crash < 60) return;
m_ticks_last_crash = ticks_since_start;
// After a collision disable the engine for a short time so that karts