summaryrefslogtreecommitdiff
path: root/src/qcommon/cm_local.h
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2005-12-20 00:53:13 +0000
committerTim Angus <tim@ngus.net>2005-12-20 00:53:13 +0000
commit611eb5ee8a55d5aa473c48f8f9436a01e3f0cdb7 (patch)
treee2c52d2d0c43e5343df017c7578fb99275a8bfed /src/qcommon/cm_local.h
parent65b823bf367034c204d370a6a73965a196072153 (diff)
* New collision type, for improved light flares
Diffstat (limited to 'src/qcommon/cm_local.h')
-rw-r--r--src/qcommon/cm_local.h51
1 files changed, 35 insertions, 16 deletions
diff --git a/src/qcommon/cm_local.h b/src/qcommon/cm_local.h
index 0b4f72cc..cc69482b 100644
--- a/src/qcommon/cm_local.h
+++ b/src/qcommon/cm_local.h
@@ -51,10 +51,18 @@ typedef struct cmodel_s {
cLeaf_t leaf; // submodels don't reference the main tree
} cmodel_t;
+typedef struct cbrushedge_s
+{
+ vec3_t p0;
+ vec3_t p1;
+} cbrushedge_t;
+
typedef struct {
- cplane_t *plane;
- int surfaceFlags;
- int shaderNum;
+ cplane_t *plane;
+ int planeNum;
+ int surfaceFlags;
+ int shaderNum;
+ winding_t *winding;
} cbrushside_t;
typedef struct {
@@ -64,6 +72,9 @@ typedef struct {
int numsides;
cbrushside_t *sides;
int checkcount; // to avoid repeated testings
+ qboolean collided; // marker for optimisation
+ cbrushedge_t *edges;
+ int numEdges;
} cbrush_t;
@@ -143,28 +154,36 @@ extern cvar_t *cm_playerCurveClip;
// cm_test.c
+typedef struct
+{
+ float startRadius;
+ float endRadius;
+} biSphere_t;
+
// Used for oriented capsule collision detection
typedef struct
{
- qboolean use;
float radius;
float halfheight;
vec3_t offset;
} sphere_t;
typedef struct {
- vec3_t start;
- vec3_t end;
- vec3_t size[2]; // size of the box being swept through the model
- vec3_t offsets[8]; // [signbits][x] = either size[0][x] or size[1][x]
- float maxOffset; // longest corner length from origin
- vec3_t extents; // greatest of abs(size[0]) and abs(size[1])
- vec3_t bounds[2]; // enclosing box of start and end surrounding by size
- vec3_t modelOrigin;// origin of the model tracing through
- int contents; // ored contents of the model tracing through
- qboolean isPoint; // optimized case
- trace_t trace; // returned from trace call
- sphere_t sphere; // sphere for oriendted capsule collision
+ traceType_t type;
+ vec3_t start;
+ vec3_t end;
+ vec3_t size[2]; // size of the box being swept through the model
+ vec3_t offsets[8]; // [signbits][x] = either size[0][x] or size[1][x]
+ float maxOffset; // longest corner length from origin
+ vec3_t extents; // greatest of abs(size[0]) and abs(size[1])
+ vec3_t bounds[2]; // enclosing box of start and end surrounding by size
+ vec3_t modelOrigin;// origin of the model tracing through
+ int contents; // ored contents of the model tracing through
+ qboolean isPoint; // optimized case
+ trace_t trace; // returned from trace call
+ sphere_t sphere; // sphere for oriendted capsule collision
+ biSphere_t biSphere;
+ qboolean testLateralCollision; // whether or not to test for lateral collision
} traceWork_t;
typedef struct leafList_s {