mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-11 07:11:54 +00:00
- added Edward-san's 'changemus' submission for printing the currently playing music track.
SVN r2782 (trunk)
This commit is contained in:
parent
d5f9b0874e
commit
4ca21e8e38
1 changed files with 21 additions and 9 deletions
|
@ -2618,15 +2618,27 @@ CCMD (idmus)
|
||||||
|
|
||||||
CCMD (changemus)
|
CCMD (changemus)
|
||||||
{
|
{
|
||||||
if (argv.argc() > 1)
|
if (argv.argc() > 1)
|
||||||
{
|
{
|
||||||
if (PlayList)
|
if (PlayList)
|
||||||
{
|
{
|
||||||
delete PlayList;
|
delete PlayList;
|
||||||
PlayList = NULL;
|
PlayList = NULL;
|
||||||
}
|
}
|
||||||
S_ChangeMusic (argv[1], argv.argc() > 2 ? atoi (argv[2]) : 0);
|
S_ChangeMusic (argv[1], argv.argc() > 2 ? atoi (argv[2]) : 0);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const char *currentmus = mus_playing.name.GetChars();
|
||||||
|
if(currentmus != NULL && *currentmus != 0)
|
||||||
|
{
|
||||||
|
Printf ("currently playing %s\n", currentmus);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Printf ("no music playing\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
Loading…
Reference in a new issue