- 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: case 6:
{ {
int nXIndex = sector[nIndex].extra; auto sect = &sector[nIndex];
assert(nXIndex > 0 && nXIndex < kMaxXSectors); return sect->hasX()? sect->xs().busy : 0;
return xsector[nXIndex].busy;
} }
case 0: case 0:
{ {
int nXIndex = wall[nIndex].extra; auto wal = &wall[nIndex];
assert(nXIndex > 0 && nXIndex < kMaxXWalls); return wal->hasX()? wal->xw().busy : 0;
return xwall[nXIndex].busy;
} }
case 3: case 3:
{ {