diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-10 09:32:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-10 09:32:56 +0100 |
commit | dd851d8f91bfdde7c75e5d195e2d5bc05e85ffc6 (patch) | |
tree | a8b474d02f1b7493ed2ad1b1d12030848cfbdb24 | |
parent | 8e056ba2034caa9f69d242eb97eff54ce3760813 (diff) | |
parent | d7f2c31a05458f672f8f85c4cae6eccb9de09981 (diff) |
Merge pull request #43333 from YeldhamDev/global_rate_scale_min
Disallow setting the AudioServer's 'global_rate_scale' to a value equal or inferior to 0
-rw-r--r-- | servers/audio_server.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/audio_server.cpp b/servers/audio_server.cpp index fdce55320c..bea5e9e432 100644 --- a/servers/audio_server.cpp +++ b/servers/audio_server.cpp @@ -905,6 +905,8 @@ bool AudioServer::is_bus_channel_active(int p_bus, int p_channel) const { } void AudioServer::set_global_rate_scale(float p_scale) { + ERR_FAIL_COND(p_scale <= 0); + global_rate_scale = p_scale; } |