protected int GetQueueSoundStatus(int sound)
{
var j = _queue_pos;
var i = _queue_end;
while (i != j)
{
var a = _cmd_queue[i].array;
if (a[0] == CommandId && a[1] == 8 && a[2] == sound)
return 2;
i = (uint)((i + 1) % _cmd_queue.Length);
}
for (i = 0; i < _deferredCommands.Length; ++i)
{
if (_deferredCommands[i].TimeLeft != 0 && _deferredCommands[i].A == 8 &&
_deferredCommands[i].B == sound)
{
return 2;
}
}
return 0;
}