Fix new vehicle crash sounds playing in high speed turns with no crash
This commit is contained in:
parent
8ef4677243
commit
77718ac7fc
@ -371,6 +371,9 @@ void game::Vehicle::UpdateCrash()
|
||||
float diff = glm::distance(velocity, prev_velocity_);
|
||||
prev_velocity_ = velocity;
|
||||
|
||||
if (glm::length2(velocity) > 9.0f)
|
||||
diff = 0.0f;
|
||||
|
||||
float snd_crash_intensity = glm::max(diff * 500.0f, crash_intensity_);
|
||||
|
||||
if (snd_crash_intensity > 1000.0f)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user