]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.h
DP code cleanup, stage one - all headers that can be protected by ifdef
[xonotic/darkplaces.git] / world.h
diff --git a/world.h b/world.h
index 55838dca58f57943901937f6837f84ae78c52da0..81c662ce93565df6fa49f842c930826255e66add 100644 (file)
--- a/world.h
+++ b/world.h
@@ -19,26 +19,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */
 // world.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
-       int             startcontents;  // if not zero, treats this value as empty, and
-                                                       // all others as solid (impact on content change)
-       int             endcontents;    // set to the contents that was hit at the end point
-} trace_t;
+#ifndef WORLD_H
+#define WORLD_H
 
+#include "collision.h"
 
 #define        MOVE_NORMAL             0
 #define        MOVE_NOMONSTERS 1
@@ -60,8 +44,6 @@ void SV_LinkEdict (edict_t *ent, qboolean touch_triggers);
 // if touchtriggers, calls prog functions for the intersected triggers
 
 extern int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
-// LordHavoc: waste of time to wrap it
-//int SV_PointContents (vec3_t p);
 #define SV_PointContents(testpoint) SV_HullPointContents(&sv.worldmodel->hulls[0], 0, (testpoint))
 // returns the CONTENTS_* value from the world at the given point.
 // does not check any entities at all
@@ -70,7 +52,7 @@ extern int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
 edict_t        *SV_TestEntityPosition (edict_t *ent);
 
 trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, edict_t *passedict);
-// mins and maxs are reletive
+// mins and maxs are relative
 
 // if the entire move stays in a solid volume, trace.allsolid will be set
 
@@ -82,21 +64,5 @@ trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, e
 
 // passedict is explicitly excluded from clipping checks (normally NULL)
 
-int SV_RecursiveHullCheck (int num, float p1f, float p2f, vec3_t p1, vec3_t p2);
+#endif
 
-typedef struct
-{
-       hull_t *hull;
-       trace_t *trace;
-       vec3_t start;
-       vec3_t dist;
-}
-RecursiveHullCheckTraceInfo_t;
-
-// LordHavoc: FIXME: this is not thread safe, if threading matters here, pass
-// this as a struct to RecursiveHullCheck, RecursiveHullCheck_Impact, etc...
-extern RecursiveHullCheckTraceInfo_t RecursiveHullCheckInfo;
-
-// optimized variant of RecursiveHullCheck that only returns success/failure
-// FIXME: broken, fix it
-//extern qboolean SV_TestLine (hull_t *hull, int num, vec3_t p1, vec3_t p2);