X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=collision.c;h=ef237e92e6d7c61ad2e4961acb0aad57e091665b;hb=eeb96ed69cba8165ecccbcde91fc7d5bee43ea18;hp=af0758f50fb196d5c9914ba9402b43fde49c933e;hpb=1a05365812a8245cab7ef4778253ededa7dbfbb8;p=xonotic%2Fdarkplaces.git diff --git a/collision.c b/collision.c index af0758f5..ef237e92 100644 --- a/collision.c +++ b/collision.c @@ -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;