From: havoc Date: Sun, 4 Oct 2009 00:31:17 +0000 (+0000) Subject: fix bug in last patch - must set trace.endpos AFTER calling TracePoint X-Git-Tag: xonotic-v0.1.0preview~1340 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4f0f1d15ebb91d53c1d449cf96f6be3791566edc;p=xonotic%2Fdarkplaces.git fix bug in last patch - must set trace.endpos AFTER calling TracePoint function, because it memsets the trace git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9293 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/collision.c b/collision.c index 192e7729..b6bdc443 100644 --- a/collision.c +++ b/collision.c @@ -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)