protected Box GetBoxBase(int boxnum)
{
if (boxnum == 255)
return null;
// As a workaround, we simply use the last box if the last+1 box is requested.
// Note that this may cause different behavior than the original game
// engine exhibited! To faithfully reproduce the behavior of the original
// engine, we would have to know the data coming *after* the walkbox table.
if (_boxes.Length == boxnum)
boxnum--;
return _boxes[boxnum];
}