This function exists in music.cpp:
Code: Select all
int MusicEnabled() // int return is for scripting
Strange comment, as it's never been available for scripting, and I have no clue why scripting would require an int return. It's the only thing that ever queries the `-nomusic` flag, and it combines that with checking `mus_enabled`, which can already be checked. The function itself, hopefully returning a boolean and not an integer, would be useful in ZScript. Additionally, I've sighted a couple of times `mus_enabled` is directly checked instead of `MusicEnabled`, which appears to be erroneous.
Code: Select all
// Just record it if volume is 0 or music was disabled
if (snd_musicvolume <= 0 || !mus_enabled)
Code: Select all
if (!mus_playing.LastSong.IsEmpty() && mus_enabled)