From 9d5c2373380eb883a2b02fd16f3b0ad0ab2a04c0 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 22 Dec 2023 13:19:06 +0100 Subject: [PATCH] Add new reversed packet header flags These flags only exist in the respawn version of the engine. Renamed 'CNetChan::unknown_challenge_var' to 'CNetChan::m_nRealTimePackets'. This field counts the number of packets sent while the frame time wasn't prescaled with the 'host_timescale' cvar, see r5apex.exe+0x3093C0 (140309FC0). --- src/common/protocol.h | 3 ++- src/engine/net_chan.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/protocol.h b/src/common/protocol.h index 73beca64..7610e7c1 100644 --- a/src/common/protocol.h +++ b/src/common/protocol.h @@ -47,4 +47,5 @@ enum class PERSISTENCE : int #define PACKET_FLAG_ENCRYPTED (1<<2) // packet is encrypted #define PACKET_FLAG_SPLIT (1<<3) // packet is split #define PACKET_FLAG_CHOKED (1<<4) // packet was choked by sender - +#define PACKET_FLAG_PRESCALED (1<<5) // packet was sent by sender with prescaled frame time +#define PACKET_FLAG_LOOPBACK (1<<6) // packet was sent from loopback connection diff --git a/src/engine/net_chan.h b/src/engine/net_chan.h index 4e32607d..11aadac9 100644 --- a/src/engine/net_chan.h +++ b/src/engine/net_chan.h @@ -174,7 +174,7 @@ public: int m_nInSequenceNr; int m_nOutSequenceNrAck; int m_nChokedPackets; - int unknown_challenge_var; + int m_nRealTimePackets; // Number of packets without prescaled frame times. private: #if defined (GAMEDLL_S0) || defined (GAMEDLL_S1) || defined (GAMEDLL_S2)