Merged duplicate client/server functions (placed into PMOVETST.C).

pmtrace_t replaced by trace_t with ent->entnum change
pmplane_t replaced by plane_t
This commit is contained in:
Dabb 2001-03-05 11:52:19 +00:00
parent f15c42184d
commit a033a03624
2 changed files with 15 additions and 26 deletions

View file

@ -32,6 +32,7 @@
#include "protocol.h"
#include "mathlib.h"
#include "model.h"
#include "progs.h"
#define STOP_EPSILON 0.1
@ -39,7 +40,7 @@ typedef struct
{
vec3_t normal;
float dist;
} pmplane_t;
} plane_t;
typedef struct
{
@ -48,10 +49,15 @@ typedef struct
qboolean inopen, inwater;
float fraction; // time completed, 1.0 = didn't hit anything
vec3_t endpos; // final position
pmplane_t plane; // surface normal at impact
int ent; // entity the surface is on
} pmtrace_t;
plane_t plane; // surface normal at impact
// Dabb: only difference between server and client
// int ent; // vs servers edict_t *ent;
int entnum;
edict_t *ent; // entity the surface is on
} trace_t;
#define MAX_PHYSENTS 32
typedef struct
@ -62,7 +68,6 @@ typedef struct
int info; // for client or server to identify
} physent_t;
typedef struct
{
int sequence; // just for debugging prints
@ -113,10 +118,10 @@ void PlayerMove (void);
void Pmove_Init (void);
void Pmove_Init_Cvars (void);
int PM_HullPointContents (hull_t *hull, int num, vec3_t p);
int HullPointContents (hull_t *hull, int num, vec3_t p);
int PM_PointContents (vec3_t point);
qboolean PM_TestPlayerPosition (vec3_t point);
pmtrace_t PM_PlayerMove (vec3_t start, vec3_t stop);
trace_t PM_PlayerMove (vec3_t start, vec3_t stop);
#endif // _PMOVE_H

View file

@ -33,23 +33,7 @@
#include "mathlib.h"
#include "model.h"
#include "progs.h"
typedef struct
{
vec3_t normal;
float dist;
} plane_t;
typedef struct
{
qboolean allsolid; // if true, plane is not valid
qboolean startsolid; // if true, the initial point was in a solid area
qboolean inopen, inwater;
float fraction; // time completed, 1.0 = didn't hit anything
vec3_t endpos; // final position
plane_t plane; // surface normal at impact
edict_t *ent; // entity the surface is on
} trace_t;
#include "pmove.h"
#define MOVE_NORMAL 0
#define MOVE_NOMONSTERS 1