]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
optimized AngleVectors calls (pass NULL for vectors that should not be generated)
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index a2cc7e488d1161936ca80dace52313237822e6f0..1c4b74bb1164f292f2dd6cde6cf598f3fa1f2a78 100644 (file)
--- a/world.c
+++ b/world.c
@@ -538,7 +538,19 @@ POINT TESTING IN HULLS
 ===============================================================================
 */
 
-// SV_HullPointContents moved to cpu_noasm.c
+/*
+==================
+SV_HullPointContents
+
+==================
+*/
+int SV_HullPointContents (hull_t *hull, int num, vec3_t p)
+{
+       while (num >= 0)
+               num = hull->clipnodes[num].children[(hull->planes[hull->clipnodes[num].planenum].type < 3 ? p[hull->planes[hull->clipnodes[num].planenum].type] : DotProduct (hull->planes[hull->clipnodes[num].planenum].normal, p)) < hull->planes[hull->clipnodes[num].planenum].dist];
+       
+       return num;
+}
 
 /*
 ============
@@ -1050,8 +1062,7 @@ loc0:
                        trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins2, clip->maxs2, clip->end);
                else
                        trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins, clip->maxs, clip->end);
-               if (trace.allsolid || trace.startsolid ||
-               trace.fraction < clip->trace.fraction)
+               if (trace.allsolid || trace.startsolid || trace.fraction < clip->trace.fraction)
                {
                        trace.ent = touch;
                        if (clip->trace.startsolid)