lua: Fix wesnoth.audio.volume always setting the volume to 0
This commit is contained in:
parent
24a11e4404
commit
9c2ad49026
2 changed files with 2 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
### Editor
|
||||
### Multiplayer
|
||||
### Lua API
|
||||
* Fixed `wesnoth.audio.volume = N` always setting volume to 0.
|
||||
### Packaging
|
||||
### Terrain
|
||||
### Translations
|
||||
|
|
|
@ -497,7 +497,7 @@ static int impl_audio_set(lua_State* L)
|
|||
return 0;
|
||||
}
|
||||
int vol = preferences::sound_volume();
|
||||
float rel = lua_tonumber(L, 2);
|
||||
float rel = lua_tonumber(L, 3);
|
||||
if(rel < 0.0f || rel > 100.0f) {
|
||||
return luaL_argerror(L, 1, "volume must be in range 0..100");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue