mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-02-21 19:00:56 +00:00
- added Edward-san's improvements for changemus command.
SVN r2902 (trunk)
This commit is contained in:
parent
5ff3b3f329
commit
0490c35347
5 changed files with 56 additions and 48 deletions
|
@ -827,7 +827,7 @@ static FSoundChan *S_StartSound(AActor *actor, const sector_t *sec, const FPolyO
|
|||
FVector3 pos, vel;
|
||||
FRolloffInfo *rolloff;
|
||||
|
||||
if (sound_id <= 0 || volume <= 0 || nosfx)
|
||||
if (sound_id <= 0 || volume <= 0 || nosfx || nosound )
|
||||
return NULL;
|
||||
|
||||
int type;
|
||||
|
@ -2582,6 +2582,8 @@ CCMD (idmus)
|
|||
FString map;
|
||||
int l;
|
||||
|
||||
if (!nomusic)
|
||||
{
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
if (gameinfo.flags & GI_MAPxx)
|
||||
|
@ -2615,6 +2617,7 @@ CCMD (idmus)
|
|||
Printf ("%s\n", GStrings("STSTR_NOMUS"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
@ -2625,6 +2628,8 @@ CCMD (idmus)
|
|||
|
||||
CCMD (changemus)
|
||||
{
|
||||
if (!nomusic)
|
||||
{
|
||||
if (argv.argc() > 1)
|
||||
{
|
||||
if (PlayList)
|
||||
|
@ -2646,6 +2651,7 @@ CCMD (changemus)
|
|||
Printf ("no music playing\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -93,6 +93,6 @@ public:
|
|||
bool m_Looping;
|
||||
bool m_NotStartedYet; // Song has been created but not yet played
|
||||
};
|
||||
|
||||
extern int nomusic;
|
||||
|
||||
#endif //__I_MUSIC_H__
|
||||
|
|
|
@ -593,6 +593,7 @@ protected:
|
|||
void SetupForHMI(int len);
|
||||
void SetupForHMP(int len);
|
||||
void CheckCaps(int tech);
|
||||
|
||||
void DoInitialSetup();
|
||||
void DoRestart();
|
||||
bool CheckDone();
|
||||
|
@ -749,6 +750,5 @@ MusInfo *GME_OpenSong(FILE *file, BYTE *musiccache, int len, const char *fmt);
|
|||
// --------------------------------------------------------------------------
|
||||
|
||||
extern MusInfo *currSong;
|
||||
extern int nomusic;
|
||||
|
||||
EXTERN_CVAR (Float, snd_musicvolume)
|
||||
|
|
|
@ -81,6 +81,7 @@ CVAR (String, snd_output, "default", CVAR_ARCHIVE|CVAR_GLOBALCONFIG)
|
|||
CVAR (Bool, snd_pitched, false, CVAR_ARCHIVE)
|
||||
|
||||
SoundRenderer *GSnd;
|
||||
bool nosound;
|
||||
bool nosfx;
|
||||
|
||||
void I_CloseSound ();
|
||||
|
@ -235,7 +236,7 @@ public:
|
|||
void I_InitSound ()
|
||||
{
|
||||
/* Get command line options: */
|
||||
bool nosound = !!Args->CheckParm ("-nosound");
|
||||
nosound = !!Args->CheckParm ("-nosound");
|
||||
nosfx = !!Args->CheckParm ("-nosfx");
|
||||
|
||||
if (nosound)
|
||||
|
|
|
@ -145,6 +145,7 @@ public:
|
|||
|
||||
extern SoundRenderer *GSnd;
|
||||
extern bool nosfx;
|
||||
extern bool nosound;
|
||||
|
||||
void I_InitSound ();
|
||||
void I_ShutdownSound ();
|
||||
|
|
Loading…
Reference in a new issue