Skip to content

Commit

Permalink
EXTENSION: Add MVD_PEXT1_EXTRA_PFS.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dsvensson committed Jan 19, 2023
1 parent 3474ffa commit 828c00b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,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

//=========================================
Expand Down Expand Up @@ -291,8 +293,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
Expand Down Expand Up @@ -362,6 +369,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
Expand Down

0 comments on commit 828c00b

Please sign in to comment.