From 4f0f1d15ebb91d53c1d449cf96f6be3791566edc Mon Sep 17 00:00:00 2001 From: havoc Date: Sun, 4 Oct 2009 00:31:17 +0000 Subject: [PATCH] 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 --- collision.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.2