From: havoc Date: Sun, 4 Oct 2009 00:31:48 +0000 (+0000) Subject: fix another case of Trace.endpos being set too early X-Git-Tag: xonotic-v0.1.0preview~1339 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9787fdb76dc5c2ef376711c7678d1cf25d041abc;p=xonotic%2Fdarkplaces.git fix another case of Trace.endpos being set too early git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9294 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/collision.c b/collision.c index b6bdc443..6583d34d 100644 --- a/collision.c +++ b/collision.c @@ -1613,7 +1613,6 @@ void Collision_ClipPointToGenericEntity(trace_t *trace, dp_model_t *model, int f memset(trace, 0, sizeof(*trace)); trace->fraction = trace->realfraction = 1; - VectorCopy(start, trace->endpos); Matrix4x4_Transform(inversematrix, start, starttransformed); #if COLLISIONPARANOID >= 3 @@ -1628,6 +1627,7 @@ void Collision_ClipPointToGenericEntity(trace_t *trace, dp_model_t *model, int f // transform plane // NOTE: this relies on plane.dist being directly after plane.normal Matrix4x4_TransformPositivePlane(matrix, trace->plane.normal[0], trace->plane.normal[1], trace->plane.normal[2], trace->plane.dist, trace->plane.normal); + VectorCopy(start, trace->endpos); } void Collision_ClipPointToWorld(trace_t *trace, dp_model_t *model, const vec3_t start, int hitsupercontents)