Fix crashed sound repeating
This commit is contained in:
parent
7ddd498156
commit
d4eaec6667
@ -2265,7 +2265,7 @@ void Kart::crashed(const Material *m, const Vec3 &normal)
|
|||||||
void Kart::playCrashSFX(const Material* m, AbstractKart *k)
|
void Kart::playCrashSFX(const Material* m, AbstractKart *k)
|
||||||
{
|
{
|
||||||
int ticks_since_start = World::getWorld()->getTicksSinceStart();
|
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;
|
m_ticks_last_crash = ticks_since_start;
|
||||||
// After a collision disable the engine for a short time so that karts
|
// After a collision disable the engine for a short time so that karts
|
||||||
|
Loading…
Reference in New Issue
Block a user