mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-16 01:02:03 +00:00
- added 'listsoundchannels' CCMD for debugging.
This commit is contained in:
parent
ec58178695
commit
c4f932022c
1 changed files with 20 additions and 0 deletions
|
@ -2993,3 +2993,23 @@ CCMD (cachesound)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
CCMD(listsoundchannels)
|
||||
{
|
||||
FSoundChan *chan;
|
||||
int count = 0;
|
||||
for (chan = Channels; chan != NULL; chan = chan->NextChan)
|
||||
{
|
||||
if (!(chan->ChanFlags & CHAN_EVICTED))
|
||||
{
|
||||
FVector3 chanorigin;
|
||||
|
||||
CalcPosVel(chan, &chanorigin, NULL);
|
||||
|
||||
Printf("%s at (%1.5f, %1.5f, %1.5f)\n", (const char*)chan->SoundID, chanorigin.X, chanorigin.Y, chanorigin.Z);
|
||||
count++;
|
||||
}
|
||||
}
|
||||
Printf("%d sounds playing\n", count);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue