1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

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
This commit is contained in:
Rémi Verschelde
2020-11-10 09:32:56 +01:00
committed by GitHub

View File

@@ -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) { void AudioServer::set_global_rate_scale(float p_scale) {
ERR_FAIL_COND(p_scale <= 0);
global_rate_scale = p_scale; global_rate_scale = p_scale;
} }