From 1fdc8ff8c69823531d38cef1451c05fa54db22c1 Mon Sep 17 00:00:00 2001 From: dusty-qw <71472647+dusty-qw@users.noreply.github.com> Date: Thu, 4 May 2023 00:04:48 -0700 Subject: [PATCH 1/3] Merge from iceman12k repo --- src/protocol.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/src/protocol.h b/src/protocol.h index 3a636d5..8ccd39c 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -67,6 +67,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # define MVD_PEXT1_HIDDEN_MESSAGES (1 << 5) // dem_multiple(0) packets are in format ( + )* //# define MVD_PEXT1_SERVERSIDEWEAPON2 (1 << 6) // Server-side weapon selection supports clc_mvd_weapon_full_impulse. // Can be defined in a project Makefile +#define MVD_PEXT1_WEAPONPREDICTION (1 << 7) // Send weapon and attack related data for weapon prediction +#define MVD_PEXT1_SIMPLEPROJECTILE (1 << 8) // Projectiles are sent as simple semi-stateless ents # if defined(MVD_PEXT1_DEBUG_ANTILAG) || defined(MVD_PEXT1_DEBUG_WEAPON) # define MVD_PEXT1_DEBUG @@ -238,6 +240,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # define svc_fte_voicechat 84 #endif // FTE_PEXT2_VOICECHAT +#ifdef MVD_PEXT1_SIMPLEPROJECTILE +#define svc_packetsprojectiles 100 // [...] +#define svc_deltapacketsprojectiles 101 // [...] +#endif + //============================================== // client to server @@ -250,6 +257,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define clc_tmove 6 // teleport request, spectator only #define clc_upload 7 // teleport request, spectator only +#ifdef MVD_PEXT1_SIMPLEPROJECTILE +#define clc_ackframe 50 +#endif + #ifdef FTE_PEXT2_VOICECHAT #define clc_voicechat 83 // FTE voice chat. #endif // FTE_PEXT2_VOICECHAT @@ -272,6 +283,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // others #define clc_mvd_weapon_full_impulse 128 // if set, each weapon set as a byte, rather than packing two into one +#if defined(MVD_PEXT1_DEBUG_ANTILAG) || defined(MVD_PEXT1_DEBUG_WEAPON) +#define MVD_PEXT1_DEBUG +#define MVD_PEXT1_ANTILAG_CLIENTPOS 128 // flag set on the playernum if the client positions are also included + +#define clc_mvd_debug 201 + +#define clc_mvd_debug_type_antilag 1 +#define clc_mvd_debug_type_weapon 2 +#endif //============================================== @@ -293,6 +313,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define PF_PMC_MASK 7 #define PF_ONGROUND (1<<14) // ZQuake extension #define PF_SOLID (1<<15) // ZQuake extension +#define PF_FTE_EXTRA (1<<16) // FTE extension // encoded player move types #define PMC_NORMAL 0 // normal ground movement @@ -463,6 +484,24 @@ typedef struct entity_state_s { byte trans; } entity_state_t; +#ifdef MVD_PEXT1_SIMPLEPROJECTILE +#define MAX_SIMPLEPROJECTILES 64 +typedef struct sprojectile_state_s +{ + int number; // edict index + int flags; // nolerp, etc + int owner; + + int fproj_num; + float time_offset; + float time; + vec3_t origin; + vec3_t angles; + int modelindex; + vec3_t velocity; +} sprojectile_state_t; +#endif + #define MAX_PACKET_ENTITIES 64 // doesn't include nails #define MAX_PEXT256_PACKET_ENTITIES 256 // up to 256 ents, look FTE_PEXT_256PACKETENTITIES #define MAX_MVD_PACKET_ENTITIES 300 // !!! MUST not be less than any of above values!!! @@ -470,6 +509,10 @@ typedef struct entity_state_s { typedef struct packet_entities_s { int num_entities; entity_state_t entities[MAX_MVD_PACKET_ENTITIES]; +#ifdef MVD_PEXT1_SIMPLEPROJECTILE + int num_sprojectiles; + sprojectile_state_t sprojectiles[MAX_SIMPLEPROJECTILES]; +#endif } packet_entities_t; typedef struct usercmd_s { @@ -480,6 +523,7 @@ typedef struct usercmd_s { short upmove; byte buttons; byte impulse; + byte impulse_pred; //this is our impulse, even if it was overrode by serversideweapon } usercmd_t; //============================================== From 0fce98617795169272647efd3a4de4b4ab2bd0b9 Mon Sep 17 00:00:00 2001 From: dusty-qw <71472647+dusty-qw@users.noreply.github.com> Date: Thu, 15 Jun 2023 12:47:53 -0700 Subject: [PATCH 2/3] change qw-prot build --- .github/workflows/build-ezquake.yml | 2 +- .github/workflows/build-mvdsv.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ezquake.yml b/.github/workflows/build-ezquake.yml index 21c0d31..7d749eb 100644 --- a/.github/workflows/build-ezquake.yml +++ b/.github/workflows/build-ezquake.yml @@ -21,7 +21,7 @@ jobs: platform: x64 steps: - name: Checkout qwprot - uses: actions/checkout@v3 + uses: actions/checkout@master - name: Checkout ezquake uses: actions/checkout@master with: diff --git a/.github/workflows/build-mvdsv.yml b/.github/workflows/build-mvdsv.yml index 73e883c..623d2f0 100644 --- a/.github/workflows/build-mvdsv.yml +++ b/.github/workflows/build-mvdsv.yml @@ -28,7 +28,7 @@ jobs: ext: ".so" steps: - name: Checkout qwprot - uses: actions/checkout@v3 + uses: actions/checkout@master - name: Checkout mvdsv uses: actions/checkout@master with: From 93c26b0085af42390eb99e693eea0e2e26e097ce Mon Sep 17 00:00:00 2001 From: dusty-qw <71472647+dusty-qw@users.noreply.github.com> Date: Thu, 15 Jun 2023 14:33:45 -0700 Subject: [PATCH 3/3] Revert "change qw-prot build" This reverts commit 0fce98617795169272647efd3a4de4b4ab2bd0b9. --- .github/workflows/build-ezquake.yml | 2 +- .github/workflows/build-mvdsv.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-ezquake.yml b/.github/workflows/build-ezquake.yml index 7d749eb..21c0d31 100644 --- a/.github/workflows/build-ezquake.yml +++ b/.github/workflows/build-ezquake.yml @@ -21,7 +21,7 @@ jobs: platform: x64 steps: - name: Checkout qwprot - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Checkout ezquake uses: actions/checkout@master with: diff --git a/.github/workflows/build-mvdsv.yml b/.github/workflows/build-mvdsv.yml index 623d2f0..73e883c 100644 --- a/.github/workflows/build-mvdsv.yml +++ b/.github/workflows/build-mvdsv.yml @@ -28,7 +28,7 @@ jobs: ext: ".so" steps: - name: Checkout qwprot - uses: actions/checkout@master + uses: actions/checkout@v3 - name: Checkout mvdsv uses: actions/checkout@master with: