From: havoc Date: Thu, 13 Jan 2005 06:32:29 +0000 (+0000) Subject: bound fractions after trace code X-Git-Tag: xonotic-v0.1.0preview~5224 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=45e00ad85bfa8678f192f530a1ed64286336417e;p=xonotic%2Fdarkplaces.git bound fractions after trace code git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4925 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/world.c b/world.c index cdf94518..6cc992fe 100644 --- a/world.c +++ b/world.c @@ -505,6 +505,8 @@ trace_t SV_ClipMoveToEntity(edict_t *ent, const vec3_t start, const vec3_t mins, } else Collision_ClipTrace_Box(&trace, ent->v->mins, ent->v->maxs, starttransformed, mins, maxs, endtransformed, SUPERCONTENTS_SOLID, SUPERCONTENTS_SOLID); + trace.fraction = bound(0, trace.fraction, 1); + trace.realfraction = bound(0, trace.realfraction, 1); if (trace.fraction < 1) {