box_planes[i].type = i>>1;
box_planes[i].normal[i>>1] = 1;
}
-
+
}
VectorAdd (trace.endpos, offset, trace.endpos);
trace.ent = ent;
}
- else if (trace.startsolid)
+ else if (trace.allsolid || trace.startsolid)
trace.ent = ent;
return trace;
edict_t *touch;
trace_t trace;
+loc0:
if (clip->trace.allsolid)
return;
-loc0:
// touch linked edicts
for (l = node->solid_edicts.next ; l != &node->solid_edicts ; l = next)
{
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.ent = touch;
- if (clip->trace.startsolid)
+ clip->trace = trace;
+ return;
+ }
+ if (trace.startsolid || trace.fraction < clip->trace.fraction)
+ {
+ if (clip->trace.startsolid)
{
clip->trace = trace;
clip->trace.startsolid = true;
else
clip->trace = trace;
}
- if (clip->trace.allsolid)
- return;
}
// recurse down both sides