]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - world.c
updated makefile and added r_explosion.c (forgot)
[xonotic/darkplaces.git] / world.c
diff --git a/world.c b/world.c
index 6be76178b65d810988b4ea2d73050343edc57874..a2cc7e488d1161936ca80dace52313237822e6f0 100644 (file)
--- a/world.c
+++ b/world.c
@@ -325,7 +325,7 @@ loc0:
                pr_global_struct->self = EDICT_TO_PROG(touch);
                pr_global_struct->other = EDICT_TO_PROG(ent);
                pr_global_struct->time = sv.time;
-               PR_ExecuteProgram (touch->v.touch);
+               PR_ExecuteProgram (touch->v.touch, "");
 
                pr_global_struct->self = old_self;
                pr_global_struct->other = old_other;
@@ -378,7 +378,10 @@ loc0:
        if ( node->contents < 0)
        {
                if (ent->num_leafs == MAX_ENT_LEAFS)
+               {
+                       Con_DPrintf("FindTouchedLeafs overflow\n");
                        return;
+               }
 
                leaf = (mleaf_t *)node;
                leafnum = leaf - sv.worldmodel->leafs - 1;
@@ -689,11 +692,7 @@ loc0:
        }
        else
        {
-               // LordHavoc: unrolled vector operation because the compiler can't be sure vec3_origin is 0
-//             VectorSubtract (vec3_origin, plane->normal, trace->plane.normal);
-               trace->plane.normal[0] = -plane->normal[0];
-               trace->plane.normal[1] = -plane->normal[1];
-               trace->plane.normal[2] = -plane->normal[2];
+               VectorNegate (plane->normal, trace->plane.normal);
                trace->plane.dist = -plane->dist;
        }
 
@@ -749,10 +748,6 @@ loc0:
                return true;            // empty
        }
 
-       // LordHavoc: this can be eliminated by validating in the loader...  but Mercury told me not to bother
-       if (num < hull->firstclipnode || num > hull->lastclipnode)
-               Sys_Error ("SV_RecursiveHullCheck: bad node number");
-
 // find the point distances
        node = hull->clipnodes + num;
        plane = hull->planes + node->planenum;
@@ -821,11 +816,7 @@ loc0:
        }
        else
        {
-               // LordHavoc: vec3_origin is evil; the compiler can not rely on it being '0 0 0'
-//             VectorSubtract (vec3_origin, plane->normal, trace->plane.normal);
-               trace->plane.normal[0] = -plane->normal[0];
-               trace->plane.normal[1] = -plane->normal[1];
-               trace->plane.normal[2] = -plane->normal[2];
+               VectorNegate (plane->normal, trace->plane.normal);
                trace->plane.dist = -plane->dist;
        }
 
@@ -971,7 +962,7 @@ trace_t SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t max
 
                if (trace.fraction != 1)
                {
-                       VectorSubtract (vec3_origin, ent->v.angles, a);
+                       VectorNegate (ent->v.angles, a);
                        AngleVectors (a, forward, right, up);
 
                        VectorCopy (trace.endpos, temp);