mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-28 06:42:04 +00:00
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:
parent
f15c42184d
commit
a033a03624
2 changed files with 15 additions and 26 deletions
|
@ -32,6 +32,7 @@
|
||||||
#include "protocol.h"
|
#include "protocol.h"
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
|
#include "progs.h"
|
||||||
|
|
||||||
#define STOP_EPSILON 0.1
|
#define STOP_EPSILON 0.1
|
||||||
|
|
||||||
|
@ -39,19 +40,24 @@ typedef struct
|
||||||
{
|
{
|
||||||
vec3_t normal;
|
vec3_t normal;
|
||||||
float dist;
|
float dist;
|
||||||
} pmplane_t;
|
} plane_t;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
qboolean allsolid; // if true, plane is not valid
|
qboolean allsolid; // if true, plane is not valid
|
||||||
qboolean startsolid; // if true, the initial point was in a solid area
|
qboolean startsolid; // if true, the initial point was in a solid area
|
||||||
qboolean inopen, inwater;
|
qboolean inopen, inwater;
|
||||||
float fraction; // time completed, 1.0 = didn't hit anything
|
float fraction; // time completed, 1.0 = didn't hit anything
|
||||||
vec3_t endpos; // final position
|
vec3_t endpos; // final position
|
||||||
pmplane_t plane; // surface normal at impact
|
plane_t plane; // surface normal at impact
|
||||||
int ent; // entity the surface is on
|
|
||||||
} pmtrace_t;
|
|
||||||
|
|
||||||
|
// 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
|
#define MAX_PHYSENTS 32
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -62,7 +68,6 @@ typedef struct
|
||||||
int info; // for client or server to identify
|
int info; // for client or server to identify
|
||||||
} physent_t;
|
} physent_t;
|
||||||
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int sequence; // just for debugging prints
|
int sequence; // just for debugging prints
|
||||||
|
@ -113,10 +118,10 @@ void PlayerMove (void);
|
||||||
void Pmove_Init (void);
|
void Pmove_Init (void);
|
||||||
void Pmove_Init_Cvars (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);
|
int PM_PointContents (vec3_t point);
|
||||||
qboolean PM_TestPlayerPosition (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
|
#endif // _PMOVE_H
|
||||||
|
|
|
@ -33,23 +33,7 @@
|
||||||
#include "mathlib.h"
|
#include "mathlib.h"
|
||||||
#include "model.h"
|
#include "model.h"
|
||||||
#include "progs.h"
|
#include "progs.h"
|
||||||
|
#include "pmove.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;
|
|
||||||
|
|
||||||
#define MOVE_NORMAL 0
|
#define MOVE_NORMAL 0
|
||||||
#define MOVE_NOMONSTERS 1
|
#define MOVE_NOMONSTERS 1
|
||||||
|
|
Loading…
Reference in a new issue