My work is never done yet
I'm in need of a way to tell whether the object info at a given position in mobjinfo is a freeslot. I tried assuming that an object type was a freeslot if it has a spawnstate of S_NULL, making exceptions for MT_NULL and MT_OVERLAY. To test the method, I used it to calculate where the first available freeslot was, and in an unmodified game, that method successfully found it at position 417. If any custom objects were added, however, it became convinced that the first available freeslot was at 426, regardless of how many objects were actually added. I have no idea how to explain this, but I figure if I could replicate whatever foolproof system is used by SRB2 itself, that weird behavior would probably disappear. Can someone who knows about object/freeslot management lend me some help?