From 31f9ac134c13d3b5def05622164ef1daa1811246 Mon Sep 17 00:00:00 2001 From: Daniel Svensson Date: Wed, 11 Jan 2023 16:31:16 +0100 Subject: [PATCH] EXTENSION: Add MVD_PEXT1_EXTRA_PFS. mvdsv and ezQuake had a broken implementation of FTE_PEXT_TRANS since inception. To fix this, future versions of ezQuake will enable this extension in which case mvdsv will write extra playerflags. To accomodate for these bits PF_ONGROUND and PF_SOLID will be moved if the extra byte is written. This is how FTE client and server works. --- src/protocol.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/protocol.h b/src/protocol.h index d91a2fe..3cbe729 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -80,6 +80,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # define MVD_PEXT1_INCLUDEINMVD (MVD_PEXT1_HIDDEN_MESSAGES) +# define MVD_PEXT1_EXTRA_PFS (1 << 8) // Send extra flags used in conjunction with FTE_PEXT_TRANS + #endif // PROTOCOL_VERSION_MVD1 //========================================= @@ -293,8 +295,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // bits 11..13 are player move type bits (ZQuake extension) #define PF_PMC_SHIFT 11 #define PF_PMC_MASK 7 +#ifdef FTE_PEXT_TRANS +#define PF_ONGROUND (1<<22) // ZQuake extension, 14 offset to extra playerflags +#define PF_SOLID (1<<23) // ZQuake extension, 15 offset to extra playerflags +#else #define PF_ONGROUND (1<<14) // ZQuake extension #define PF_SOLID (1<<15) // ZQuake extension +#endif // encoded player move types #define PMC_NORMAL 0 // normal ground movement @@ -364,6 +371,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # endif // FTE_PEXT_SCALE # ifdef FTE_PEXT_TRANS # define U_FTE_TRANS (1<<1) //transparency value +# define PF_EXTRA_PFS (1<<15) //TRANS requires extra playerflags # define PF_TRANS_Z (1<<17) # endif // FTE_PEXT_TRANS # ifdef FTE_PEXT_FATNESS