MantisBT - Zandronum
View Issue Details
0002744Zandronum[All Projects] Suggestionpublic2016-05-30 12:362024-03-01 06:03
Tribeam3rd 
 
lowminorhave not tried
confirmedbackport later 
3.0-beta 
 
0002744: [Request] Backport SetMusicVolume
'http://zdoom.org/wiki/SetMusicVolume [^]'

Currently my survival mod uses consolecommand to achieve a music fade effect:

script "CL_ChangeMusic" (int songnum, int fadetime) clientside
{
   int v = GetCVar("SND_MusicVolume");
   for(int i = v; i > 0; i-=fadetime)
   {
      ConsoleCommand(strParam(s:"SND_MusicVolume ", f:i));
      delay(1);
   }
   switch(songnum)
   {
      case 0: SetMusic("Boss", 0); break;
      case 1: SetMusic("MAP01", 0); break;
      case 2: SetMusic("MAP02", 0); break;
   }
   ConsoleCommand(strParam(s:"SND_MusicVolume ", f:v));
}

It'd be a lot better if I didn't do it like this, modifying a user's music volume config directly is just a terrible idea heh...
Any reason to not use consolecommand is a good reason in my book

No tags attached.
Issue History
2016-05-30 12:36Tribeam3rdNew Issue
2024-03-01 06:03Ru5tK1ngStatusnew => confirmed
2024-03-01 06:03Ru5tK1ngResolutionopen => backport later

There are no notes attached to this issue.