Make DEBUGMODE=1 builds (finally) compile, run and work in netgames
This merge request changes a few things related to DEBUGMODE
to make it compile and run properly, even in netgames. Formerly, it would fail to compile due to the Dehacked table sanity check being in a separate source file from the tables, and even before that change or after fixing it, it would segfault on startup due to MOBJCONSISTANCY running even in gamestates where mobjs don't exist, resulting in invalid pointer dereferences. Both are fixed here.
Notably, this MR also makes MOBJCONSISTANCY no longer implicitly enabled by DEBUGMODE
in the Makefile, making DEBUGMODE netgame-compatible by default. The MOBJCONSISTANCY
make flag still exists for enabling it.
The aforementioned sanity check uses sizeof
to get the size of the tables, but a rewrite to make it check size at runtime may be welcome.