]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix bug in last patch - must set trace.endpos AFTER calling TracePoint
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Oct 2009 00:31:17 +0000 (00:31 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 4 Oct 2009 00:31:17 +0000 (00:31 +0000)
function, because it memsets the trace

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

collision.c

index 192e7729c77b6556cbe870ebff443084e2aed006..b6bdc443d326099087a31e6ea877635e1b747ac2 100644 (file)
@@ -1634,9 +1634,9 @@ void Collision_ClipPointToWorld(trace_t *trace, dp_model_t *model, const vec3_t
 {
        memset(trace, 0, sizeof(*trace));
        trace->fraction = trace->realfraction = 1;
-       VectorCopy(start, trace->endpos);
        if (model && model->TracePoint)
                model->TracePoint(model, 0, trace, start, hitsupercontents);
+       VectorCopy(start, trace->endpos);
 }
 
 void Collision_CombineTraces(trace_t *cliptrace, const trace_t *trace, void *touch, qboolean isbmodel)