diff --git a/src/sound/i_music.cpp b/src/sound/i_music.cpp index b87ea670f..1cbca0863 100644 --- a/src/sound/i_music.cpp +++ b/src/sound/i_music.cpp @@ -680,6 +680,14 @@ void I_SetMusicVolume (float factor) snd_musicvolume.Callback(); } +DEFINE_ACTION_FUNCTION(DObject, SetMusicVolume) +{ + PARAM_PROLOGUE; + PARAM_FLOAT(vol); + I_SetMusicVolume((float)vol); + return 0; +} + //========================================================================== // // test a relative music volume diff --git a/wadsrc/static/zscript/base.txt b/wadsrc/static/zscript/base.txt index 658c4aa51..10e13cf50 100644 --- a/wadsrc/static/zscript/base.txt +++ b/wadsrc/static/zscript/base.txt @@ -12,6 +12,7 @@ class Object native native static bool S_ChangeMusic(String music_name, int order = 0, bool looping = true, bool force = false); native static void C_MidPrint(string fontname, string textlabel, bool bold = false); // always uses the stringtable. native static uint BAM(double angle); + native static void SetMusicVolume(float vol); native Name GetClassName();