From 1a3c9787c8ec2d6240534a6db321bb781c447fb7 Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 14 Feb 2021 21:02:17 +0000 Subject: [PATCH] pmove: reformat structures to make it compatible with engine again --- common/pmtrace.h | 15 ++++++--------- pm_shared/pm_defs.h | 2 +- pm_shared/pm_shared.cpp | 4 ++-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/common/pmtrace.h b/common/pmtrace.h index ee3201e..5ca40d5 100644 --- a/common/pmtrace.h +++ b/common/pmtrace.h @@ -25,7 +25,7 @@ typedef struct } pmplane_t; typedef struct pmtrace_s pmtrace_t; - +#pragma pack(1) struct pmtrace_s { qboolean allsolid; // if true, plane is not valid @@ -35,13 +35,10 @@ struct pmtrace_s vec3_t endpos; // final position pmplane_t plane; // surface normal at impact int ent; // entity at impact - vec3_t deltavelocity; // Change in player's velocity caused by impact. - // Only run on server. - union - { - int hitgroup; // 0 == generic, non zero is specific body part - struct mstudiomat_s *surf; // only if ent->v.solid == SOLID_CUSTOM! - }; + // Change in player's velocity caused by impact. + int stub1; + struct mstudiomat_s *surf; // only if ent->v.solid == SOLID_CUSTOM! + int hitgroup; // 0 == generic, non zero is specific body part }; - +#pragma pack() #endif diff --git a/pm_shared/pm_defs.h b/pm_shared/pm_defs.h index a61d65d..25c8256 100644 --- a/pm_shared/pm_defs.h +++ b/pm_shared/pm_defs.h @@ -134,7 +134,7 @@ typedef struct playermove_s int watertype; int oldwaterlevel; - char sztexturename[252]; // cutoff four bytes for a new variable (see below) + char sztexturename[248]; // cutoff four bytes for a new variable (see below) struct matdef_s *pMaterial; // pointer to a material char chtexturetype; diff --git a/pm_shared/pm_shared.cpp b/pm_shared/pm_shared.cpp index 83b615b..70e0951 100644 --- a/pm_shared/pm_shared.cpp +++ b/pm_shared/pm_shared.cpp @@ -350,7 +350,7 @@ qboolean PM_AddToTouched(pmtrace_t tr, const Vector &impactvelocity) if (i != pmove->numtouch) // Already in list. return false; - VectorCopy( impactvelocity, tr.deltavelocity ); +// VectorCopy( impactvelocity, tr.deltavelocity ); if (pmove->numtouch >= MAX_PHYSENTS) pmove->Con_DPrintf("Too many entities were touched!\n"); @@ -3077,7 +3077,7 @@ and client. This will ensure that prediction behaves appropriately. void PM_Move ( struct playermove_s *ppmove, int server ) { assert( pm_shared_initialized ); - +// return; pmove = ppmove; // ppmove->Con_Printf("clientmaxspeed: %f\n", ppmove->clientmaxspeed);