]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.h
rewrote memory system entirely (hunk, cache, and zone are gone, memory pools replaced...
[xonotic/darkplaces.git] / world.h
diff --git a/world.h b/world.h
index bf9507ccbf1fcb3ac56adff44e8bccd1dbd04d34..55838dca58f57943901937f6837f84ae78c52da0 100644 (file)
--- a/world.h
+++ b/world.h
@@ -8,7 +8,7 @@ of the License, or (at your option) any later version.
 
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
 See the GNU General Public License for more details.
 
@@ -34,9 +34,9 @@ typedef struct
        vec3_t  endpos;                 // final position
        plane_t plane;                  // surface normal at impact
        edict_t *ent;                   // entity the surface is on
-       // LordHavoc: added texture and lighting to traceline
-       char    *texturename;
-       vec3_t  light;
+       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;
 
 
@@ -81,3 +81,22 @@ trace_t SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type, e
 // shouldn't be considered solid objects
 
 // passedict is explicitly excluded from clipping checks (normally NULL)
+
+int SV_RecursiveHullCheck (int num, float p1f, float p2f, vec3_t p1, vec3_t p2);
+
+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);