- getSourceBusy

This commit is contained in:
Christoph Oelckers 2021-11-19 01:14:04 +01:00
parent 4cfc1577e2
commit 9cad3196ed

View file

@ -172,15 +172,13 @@ unsigned int GetSourceBusy(EVENT a1)
{
case 6:
{
int nXIndex = sector[nIndex].extra;
assert(nXIndex > 0 && nXIndex < kMaxXSectors);
return xsector[nXIndex].busy;
auto sect = &sector[nIndex];
return sect->hasX()? sect->xs().busy : 0;
}
case 0:
{
int nXIndex = wall[nIndex].extra;
assert(nXIndex > 0 && nXIndex < kMaxXWalls);
return xwall[nXIndex].busy;
auto wal = &wall[nIndex];
return wal->hasX()? wal->xw().busy : 0;
}
case 3:
{