mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 09:31:14 +00:00
- rewrote test for occupied sound channel without special types
https://forum.zdoom.org/viewtopic.php?t=66613
This commit is contained in:
parent
3c157a4f2c
commit
179c4dd238
1 changed files with 3 additions and 16 deletions
|
@ -528,22 +528,9 @@ FSoundChan *SoundEngine::StartSound(int type, const void *source,
|
||||||
{
|
{
|
||||||
if (chan->SourceType == type && chan->EntChannel == channel)
|
if (chan->SourceType == type && chan->EntChannel == channel)
|
||||||
{
|
{
|
||||||
bool foundit;
|
const bool foundit = (type == SOURCE_Unattached)
|
||||||
|
? (chan->Point[0] == pt->X && chan->Point[2] == pt->Z && chan->Point[1] == pt->Y)
|
||||||
switch (type)
|
: (chan->Source == source);
|
||||||
{
|
|
||||||
case SOURCE_Actor:
|
|
||||||
case SOURCE_Sector:
|
|
||||||
case SOURCE_Polyobj:
|
|
||||||
foundit = chan->Source == source;
|
|
||||||
break;
|
|
||||||
case SOURCE_Unattached:
|
|
||||||
foundit = chan->Point[0] == pt->X && chan->Point[2] == pt->Z && chan->Point[1] == pt->Y;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
foundit = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (foundit)
|
if (foundit)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue