]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - chase.c
pmodel command support for Nehahra multiplayer (select skins/models by one number...
[xonotic/darkplaces.git] / chase.c
diff --git a/chase.c b/chase.c
index 4249881b8aaa72bf553f196898efce0e6771d234..1831a98caca4df5f0c1594a4bfa7e531375e9f3e 100644 (file)
--- a/chase.c
+++ b/chase.c
@@ -47,7 +47,14 @@ void TraceLine (vec3_t start, vec3_t end, vec3_t impact)
        memset (&trace, 0, sizeof(trace));
        SV_RecursiveHullCheck (cl.worldmodel->hulls, 0, 0, 1, start, end, &trace);
 
-       VectorCopy (trace.endpos, impact);
+       if (trace.fraction < 1)
+       {
+               VectorCopy (trace.endpos, impact);
+       }
+       else
+       {
+               VectorCopy (end, impact);
+       }
 }
 
 void Chase_Update (void)