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 4249881..1831a98 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)