From 2d61f5c861cd2311063f78d91d2ff49be85cccc7 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 6 Sep 2024 21:41:46 +0200 Subject: [PATCH] add compiler flags NOSATURNSYNCH, NOSATURNJOIN and NOSATURNPAK not building with SATURNSYNCH also will disable SATURNJOIN since it makes not much sense to have that when synch stuff is unused --- src/Makefile | 24 ++++++++++++++++++++++++ src/doomdef.h | 12 ++++++++++-- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 72f82265b..4668518b9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -207,6 +207,18 @@ USE_FBO_OGL=1 endif endif +ifndef NONET +ifndef NOSATURNSYNCH +DOSATURNSYNCH=1 +ifndef NOSATURNJOIN +DOSATURNJOIN=1 +endif +#ifndef NOSATURNPAK +#DOSATURNPAK=1 +#endif +endif +endif + ifdef MINGW include win32/Makefile.cfg endif #ifdef MINGW @@ -386,6 +398,18 @@ OPTS+=-DUSE_FBO_OGL endif endif +ifndef NONET +ifndef NOSATURNSYNCH +OPTS+=-DDOSATURNSYNCH +ifndef NOSATURNJOIN +OPTS+=-DDOSATURNJOIN +endif +#ifndef NOSATURNPAK +#OPTS+=-DDOSATURNPAK +#endif +endif +endif + ifdef HAVE_MINIUPNPC ifdef NONET HAVE_MINIUPNPC='' diff --git a/src/doomdef.h b/src/doomdef.h index 719900ced..9aba9b5c5 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -568,20 +568,28 @@ extern const char *compdate, *comptime, *comprevision, *compbranch; // None of these that are disabled in the normal build are guaranteed to work perfectly // Compile them at your own risk! +#ifndef NONET //-- SATURN __ /// Enable gamestate resynching between Saturn servers and clients /// Like SRB2 and RR does /// Still highly experimental -//#define SATURNSYNCH +#ifdef DOSATURNSYNCH +#define SATURNSYNCH /// Detect if a client is on Saturn in the clientconfig. /// To seperately allow them to join or block joining from vanilla clients. -//#define SATURNJOIN +#ifdef DOSATURNJOIN +#define SATURNJOIN +#endif +#endif /// Server detection for if a connecting client is on Saturn. /// For stuff like extra synching, etc. +//#ifdef DOSATURNPAK //#define SATURNPAK +//#endif //-- <( ̄︶ ̄)> __ +#endif /// Undefine to use the new method of Gamma correction see colour cube in v_video.c #define BACKWARDSCOMPATCORRECTION