]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
never prefer an entity trace over a world trace if the trace fraction is 1 (not hit).
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Feb 2009 14:09:34 +0000 (14:09 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 25 Feb 2009 14:09:34 +0000 (14:09 +0000)
Fixes bug with SOLID_BSP entities sometimes being collided against "as box".

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8759 d7cf8633-e32d-0410-b094-e92efae38249

collision.c

index c993a668ed9527535d78a37e1d2c97e07a531743..b9399d6af05559fe6b03e6fd0f03822204297d39 100644 (file)
@@ -1541,7 +1541,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)
+       if ((trace->realfraction <= cliptrace->realfraction) && (trace->realfraction != 1))
        {
                cliptrace->fraction = trace->fraction;
                cliptrace->realfraction = trace->realfraction;