Add assertion limiting pitch to 0..2.

This commit is contained in:
Nolan Darilek 2022-08-25 12:19:17 -05:00
parent e4b1df13ce
commit aa60e1d70f

View File

@ -508,7 +508,7 @@ fn update_sound_properties(mut query: Query<&mut Sound>) {
..
} = *sound;
assert!(gain >= 0.);
assert!(pitch >= 0.);
assert!(pitch >= 0. && pitch <= 2.);
if sound.restart {
if let Some(generator) = sound.generator.as_mut() {
generator