]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - collision.c
clarify a comment
[xonotic/darkplaces.git] / collision.c
index b20e0c34f0618519846f35c9009db7043f676b61..ef237e92e6d7c61ad2e4961acb0aad57e091665b 100644 (file)
@@ -1036,7 +1036,7 @@ void Collision_TraceBrushTriangleMeshFloat(trace_t *trace, const colbrushf_t *th
        {
                for (i = 0;i < numtriangles;i++, element3i += 3)
                {
-                       if (TriangleOverlapsBox(vertex3f + element3i[0]*3, vertex3f + element3i[1]*3, vertex3f + element3i[2]*3, segmentmins, segmentmaxs))
+                       if (TriangleBBoxOverlapsBox(vertex3f + element3i[0]*3, vertex3f + element3i[1]*3, vertex3f + element3i[2]*3, segmentmins, segmentmaxs))
                        {
                                VectorCopy(vertex3f + element3i[0] * 3, points[0].v);
                                VectorCopy(vertex3f + element3i[1] * 3, points[1].v);
@@ -1683,7 +1683,7 @@ static collision_cachedtrace_t *Collision_Cache_Lookup(dp_model_t *model, const
        collision_cachedtrace_parameters_t params;
        // all non-cached traces use the same index
        if (!collision_cache.integer)
-               r_refdef.stats.collisioncache_traced++;
+               r_refdef.stats[r_stat_photoncache_traced]++;
        else
        {
                // cached trace lookup
@@ -1728,12 +1728,12 @@ static collision_cachedtrace_t *Collision_Cache_Lookup(dp_model_t *model, const
                        )
                                continue;
                        // found a matching trace in the cache
-                       r_refdef.stats.collisioncache_cached++;
+                       r_refdef.stats[r_stat_photoncache_cached]++;
                        cached->valid = true;
                        collision_cachedtrace_arrayused[index] = collision_cachedtrace_sequence;
                        return cached;
                }
-               r_refdef.stats.collisioncache_traced++;
+               r_refdef.stats[r_stat_photoncache_traced]++;
                // find an unused cache entry
                for (index = collision_cachedtrace_firstfree, range = collision_cachedtrace_max;index < range;index++)
                        if (collision_cachedtrace_arrayused[index] == 0)
@@ -1954,7 +1954,7 @@ void Collision_CombineTraces(trace_t *cliptrace, const trace_t *trace, void *tou
        //      cliptrace->inopen = true;
        if (trace->inwater)
                cliptrace->inwater = true;
-       if ((trace->realfraction <= cliptrace->realfraction) && (VectorLength2(trace->plane.normal) > 0))
+       if ((trace->realfraction < cliptrace->realfraction) && (VectorLength2(trace->plane.normal) > 0))
        {
                cliptrace->fraction = trace->fraction;
                cliptrace->realfraction = trace->realfraction;