From 75f7e1fbf8c7effabbc088a1bacc89ca4826da88 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Fri, 4 Mar 2022 19:59:12 +0100 Subject: Fix some properties having an invalid float step of `0` This also clamps the float step in the editor to the lowest value that is guaranteed to work in all situations (including for 32-bit floats). --- servers/audio/audio_stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'servers') diff --git a/servers/audio/audio_stream.cpp b/servers/audio/audio_stream.cpp index 5d9a9e61dc..0408db2539 100644 --- a/servers/audio/audio_stream.cpp +++ b/servers/audio/audio_stream.cpp @@ -696,7 +696,7 @@ void AudioStreamRandomizer::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::INT, "streams_count", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "set_streams_count", "get_streams_count"); ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_mode", PROPERTY_HINT_ENUM, "Random (Avoid Repeats),Random,Sequential"), "set_playback_mode", "get_playback_mode"); ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_pitch", PROPERTY_HINT_RANGE, "1,16,0.01"), "set_random_pitch", "get_random_pitch"); - ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_volume_offset_db", PROPERTY_HINT_RANGE, "0,40,0,suffix:dB"), "set_random_volume_offset_db", "get_random_volume_offset_db"); + ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "random_volume_offset_db", PROPERTY_HINT_RANGE, "0,40,0.01,suffix:dB"), "set_random_volume_offset_db", "get_random_volume_offset_db"); BIND_ENUM_CONSTANT(PLAYBACK_RANDOM_NO_REPEATS); BIND_ENUM_CONSTANT(PLAYBACK_RANDOM); -- cgit v1.2.3