]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.h
reenabled loading plaques (and cleaned up that code a lot)
[xonotic/darkplaces.git] / world.h
diff --git a/world.h b/world.h
index 7d829946aecd199f7ebc49953085e11f923e3f56..db8b5ca86c47d3624b4f0ae43f96e7a28ffa4ffa 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.
 
@@ -27,17 +27,30 @@ typedef struct
 
 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
-       // LordHavoc: added texture and lighting to traceline
-       char    *texturename;
-       vec3_t  light;
-} trace_t;
+       // if true, the entire trace was in solid
+       qboolean        allsolid;
+       // if true, the initial point was in solid
+       qboolean        startsolid;
+       // if true, the trace passed through empty somewhere
+       qboolean        inopen;
+       // if true, the trace passed through water somewhere
+       qboolean        inwater;
+       // fraction of the total distance that was traveled before impact
+       // (1.0 = did not hit anything)
+       double          fraction;
+       // final position
+       double          endpos[3];
+       // surface normal at impact
+       plane_t         plane;
+       // entity the surface is on
+       edict_t         *ent;
+       // if not zero, treats this value as empty, and all others as solid (impact
+       // on content change)
+       int                     startcontents;
+       // the contents that was hit at the end or impact point
+       int                     endcontents;
+}
+trace_t;
 
 
 #define        MOVE_NORMAL             0
@@ -82,4 +95,17 @@ 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)
 
-extern qboolean SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1, vec3_t p2, trace_t *trace);
\ No newline at end of file
+int SV_RecursiveHullCheck (int num, double p1f, double p2f, double p1[3], double p2[3]);
+
+typedef struct
+{
+       hull_t *hull;
+       trace_t *trace;
+       double start[3];
+       double dist[3];
+}
+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;