From 90611ed547044d6902ad61008a8eca2be393074e Mon Sep 17 00:00:00 2001 From: "X.organic" Date: Tue, 16 Feb 2021 21:36:28 +0100 Subject: [PATCH] Fix MOBJCONSISTANCY and make it optional in DEBUGMODE MOBJCONSISTANCY checks confined to gamestate GS_LEVEL. DEBUGMODE no longer implicitly enables them, making it netgame-compatible. --- src/Makefile | 2 +- src/d_clisrv.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 1314161bd..67560caf6 100644 --- a/src/Makefile +++ b/src/Makefile @@ -415,7 +415,7 @@ ifdef GCC48 else CFLAGS+=-O0 endif - CFLAGS+= -Wall -DPARANOIA -DRANGECHECK -DPACKETDROP -DMOBJCONSISTANCY + CFLAGS+= -Wall -DPARANOIA -DRANGECHECK -DPACKETDROP else diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 02577b508..1b6b4cd1f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -4480,6 +4480,7 @@ static INT16 Consistancy(void) ret += P_GetRandSeed(); #ifdef MOBJCONSISTANCY +if (gamestate == GS_LEVEL) { for (th = thlist[THINK_MOBJ].next; th != &thlist[THINK_MOBJ]; th = th->next) { if (th->function.acp1 == (actionf_p1)P_RemoveThinkerDelayed) @@ -4546,6 +4547,7 @@ static INT16 Consistancy(void) ret += mo->frame; } } +} #endif DEBFILE(va("Consistancy = %u\n", (ret & 0xFFFF)));