From eaea684e71dcdcfc04a29a467ec33ad9806ac589 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 f93129127..53cd173c1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -208,6 +208,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 @@ -387,6 +399,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 22f9e760d..16cfe3f7c 100644 --- a/src/doomdef.h +++ b/src/doomdef.h @@ -579,20 +579,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