]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - collision.h
support "declaring" particle effects at the top of the effectinfo file
[xonotic/darkplaces.git] / collision.h
index 919e9dcd9084ec597ef552cc6806935f7cbaff9b..0da12477b785b6393fb4baaf1c3e43b3a40a48b3 100644 (file)
@@ -16,6 +16,8 @@ typedef struct trace_s
        int allsolid;
        // if true, the initial point was in solid (see hitsupercontentsmask)
        int startsolid;
+       // this is set to true in world.c if startsolid was set in a trace against world
+       int worldstartsolid;
        // this is set to true in world.c if startsolid was set in a trace against a SOLID_BSP entity, in other words this is true if the entity is stuck in a door or wall, but not if stuck in another normal entity
        int bmodelstartsolid;
        // if true, the trace passed through empty somewhere
@@ -121,7 +123,7 @@ typedef struct colboxbrushf_s
 }
 colboxbrushf_t;
 
-void Collision_CalcPlanesForPolygonBrushFloat(colbrushf_t *brush);
+void Collision_CalcPlanesForTriangleBrushFloat(colbrushf_t *brush);
 colbrushf_t *Collision_AllocBrushFromPermanentPolygonFloat(mempool_t *mempool, int numpoints, float *points, int supercontents, int q3surfaceflags, const texture_t *texture);
 colbrushf_t *Collision_NewBrushFromPlanes(mempool_t *mempool, int numoriginalplanes, const colplanef_t *originalplanes, int supercontents, int q3surfaceflags, const texture_t *texture, int hasaabbplanes);
 void Collision_TraceBrushBrushFloat(trace_t *trace, const colbrushf_t *thisbrush_start, const colbrushf_t *thisbrush_end, const colbrushf_t *thatbrush_start, const colbrushf_t *thatbrush_end);
@@ -160,6 +162,9 @@ void Collision_ClipPointToGenericEntity(trace_t *trace, dp_model_t *model, const
 void Collision_ClipToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t mins, const vec3_t maxs, const vec3_t end, int hitsupercontents);
 void Collision_ClipLineToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t end, int hitsupercontents, qboolean hitsurfaces);
 void Collision_ClipPointToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, int hitsupercontents);
+// caching surface trace for renderer (NOT THREAD SAFE)
+void Collision_Cache_ClipLineToGenericEntitySurfaces(trace_t *trace, dp_model_t *model, matrix4x4_t *matrix, matrix4x4_t *inversematrix, const vec3_t start, const vec3_t end, int hitsupercontentsmask);
+void Collision_Cache_ClipLineToWorldSurfaces(trace_t *trace, dp_model_t *model, const vec3_t start, const vec3_t end, int hitsupercontents);
 // combines data from two traces:
 // merges contents flags, startsolid, allsolid, inwater
 // updates fraction, endpos, plane and surface info if new fraction is shorter