From 89f99ee09474dce99d053498a331111237ade813 Mon Sep 17 00:00:00 2001 From: slipher Date: Wed, 25 Feb 2026 18:07:38 -0600 Subject: [PATCH 1/2] Remove SVF_ flags that do nothing --- src/engine/server/sg_api.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/engine/server/sg_api.h b/src/engine/server/sg_api.h index f13f07ef44..12315d0120 100644 --- a/src/engine/server/sg_api.h +++ b/src/engine/server/sg_api.h @@ -28,13 +28,8 @@ along with this program. If not, see . #define SVF_NOCLIENT 0x00000001 #define SVF_CLIENTMASK 0x00000002 #define SVF_VISDUMMY 0x00000004 -#define SVF_BOT 0x00000008 -#define SVF_POW 0x00000010 // ignored by the engine #define SVF_BROADCAST 0x00000020 #define SVF_PORTAL 0x00000040 -#define SVF_BLANK 0x00000080 // ignored by the engine -#define SVF_NOFOOTSTEPS 0x00000100 // ignored by the engine -#define SVF_CAPSULE 0x00000200 #define SVF_VISDUMMY_MULTIPLE 0x00000400 #define SVF_SINGLECLIENT 0x00000800 #define SVF_NOSERVERINFO 0x00001000 // only meaningful for entities numbered in [0..MAX_CLIENTS) @@ -42,7 +37,6 @@ along with this program. If not, see . #define SVF_IGNOREBMODELEXTENTS 0x00004000 #define SVF_SELF_PORTAL 0x00008000 #define SVF_SELF_PORTAL_EXCLUSIVE 0x00010000 -#define SVF_RIGID_BODY 0x00020000 // ignored by the engine #define SVF_CLIENTS_IN_RANGE 0x00040000 // clients within range #define SVF_BROADCAST_ONCE 0x00080000 // broadcasted to newly connecting clients, and once to connected clients when spawned @@ -53,7 +47,7 @@ struct entityShared_t bool linked; // false if not in any good cluster int linkcount; - int svFlags; // SVF_NOCLIENT, SVF_BROADCAST, etc. + int svFlags; // SVF_*, flags for controlling which entities are sent to which clients int singleClient; // only send to this client when SVF_SINGLECLIENT is set int hiMask, loMask; // if SVF_CLIENTMASK is set, then only send to the // clients specified by the following 64-bit bitmask: From 5bddb8da17ef97903496c57a685d530a58658b82 Mon Sep 17 00:00:00 2001 From: slipher Date: Fri, 27 Feb 2026 04:28:58 -0600 Subject: [PATCH 2/2] Reorder and comment SVF_* flags --- src/engine/server/sg_api.h | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/engine/server/sg_api.h b/src/engine/server/sg_api.h index 12315d0120..f2dbf04566 100644 --- a/src/engine/server/sg_api.h +++ b/src/engine/server/sg_api.h @@ -25,20 +25,27 @@ along with this program. If not, see . #include "engine/qcommon/q_shared.h" -#define SVF_NOCLIENT 0x00000001 -#define SVF_CLIENTMASK 0x00000002 -#define SVF_VISDUMMY 0x00000004 -#define SVF_BROADCAST 0x00000020 -#define SVF_PORTAL 0x00000040 -#define SVF_VISDUMMY_MULTIPLE 0x00000400 -#define SVF_SINGLECLIENT 0x00000800 -#define SVF_NOSERVERINFO 0x00001000 // only meaningful for entities numbered in [0..MAX_CLIENTS) -#define SVF_NOTSINGLECLIENT 0x00002000 -#define SVF_IGNOREBMODELEXTENTS 0x00004000 -#define SVF_SELF_PORTAL 0x00008000 -#define SVF_SELF_PORTAL_EXCLUSIVE 0x00010000 -#define SVF_CLIENTS_IN_RANGE 0x00040000 // clients within range -#define SVF_BROADCAST_ONCE 0x00080000 // broadcasted to newly connecting clients, and once to connected clients when spawned +// flags for masking which clients can see the entity +#define SVF_CLIENTMASK BIT( 0 ) +#define SVF_SINGLECLIENT BIT( 1 ) +#define SVF_NOCLIENT BIT( 2 ) +#define SVF_NOTSINGLECLIENT BIT( 3 ) + +// flags for modifying visibility +#define SVF_BROADCAST BIT( 4 ) // visible from anywhere +#define SVF_BROADCAST_ONCE BIT( 5 ) // broadcasted to newly connecting clients, and once to connected clients when spawned +#define SVF_CLIENTS_IN_RANGE BIT( 6 ) +#define SVF_IGNOREBMODELEXTENTS BIT( 7 ) + +#define SVF_PORTAL BIT( 8 ) // if you see the portal, you also see what can be seen through its camera +#define SVF_NOSERVERINFO BIT( 9 ) // only meaningful for entities numbered in [0..MAX_CLIENTS) + +// ??? +#define SVF_VISDUMMY BIT( 10 ) +#define SVF_VISDUMMY_MULTIPLE BIT( 11 ) +#define SVF_SELF_PORTAL BIT( 12 ) +#define SVF_SELF_PORTAL_EXCLUSIVE BIT( 13 ) + #define MAX_ENT_CLUSTERS 16