vec3_t end;
vec_t len = 0;
- if(!VectorCompare(start, pEnd) && collision_endposnudge.value > 0)
+ if (VectorCompare(start, pEnd))
+ return CL_TracePoint(start, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
+
+ if(collision_endposnudge.value > 0)
{
// TRICK: make the trace 1 qu longer!
VectorSubtract(pEnd, start, end);
}
else
VectorCopy(pEnd, end);
-#endif
-
+#else
if (VectorCompare(start, end))
return CL_TracePoint(start, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
+#endif
if (hitnetworkentity)
*hitnetworkentity = 0;
vec3_t end;
vec_t len = 0;
+ if (VectorCompare(mins, maxs))
+ {
+ vec3_t shiftstart, shiftend;
+ VectorAdd(start, mins, shiftstart);
+ VectorAdd(pEnd, mins, shiftend);
+ if (VectorCompare(start, pEnd))
+ trace = CL_TracePoint(shiftstart, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
+ else
+ trace = CL_TraceLine(shiftstart, shiftend, type, passedict, hitsupercontentsmask, hitnetworkbrushmodels, hitnetworkplayers, hitnetworkentity, hitcsqcentities);
+ VectorSubtract(trace.endpos, mins, trace.endpos);
+ return trace;
+ }
+
if(!VectorCompare(start, pEnd) && collision_endposnudge.value > 0)
{
// TRICK: make the trace 1 qu longer!
}
else
VectorCopy(pEnd, end);
-#endif
-
+#else
if (VectorCompare(mins, maxs))
{
vec3_t shiftstart, shiftend;
VectorSubtract(trace.endpos, mins, trace.endpos);
return trace;
}
+#endif
if (hitnetworkentity)
*hitnetworkentity = 0;
vec3_t end;
vec_t len = 0;
- if(!VectorCompare(start, pEnd) && collision_endposnudge.value > 0)
+ if (VectorCompare(start, pEnd))
+ return SV_TracePoint(start, type, passedict, hitsupercontentsmask);
+
+ if(collision_endposnudge.value > 0)
{
// TRICK: make the trace 1 qu longer!
VectorSubtract(pEnd, start, end);
}
else
VectorCopy(pEnd, end);
+#else
+ if (VectorCompare(start, end))
+ return SV_TracePoint(start, type, passedict, hitsupercontentsmask);
#endif
//return SV_TraceBox(start, vec3_origin, vec3_origin, end, type, passedict, hitsupercontentsmask);
- if (VectorCompare(start, end))
- return SV_TracePoint(start, type, passedict, hitsupercontentsmask);
-
VectorCopy(start, clipstart);
VectorCopy(end, clipend);
VectorClear(clipmins2);
vec3_t end;
vec_t len = 0;
+ if (VectorCompare(mins, maxs))
+ {
+ vec3_t shiftstart, shiftend;
+ VectorAdd(start, mins, shiftstart);
+ VectorAdd(pEnd, mins, shiftend);
+ if (VectorCompare(start, pEnd))
+ trace = SV_TracePoint(shiftstart, type, passedict, hitsupercontentsmask);
+ else
+ trace = SV_TraceLine(shiftstart, shiftend, type, passedict, hitsupercontentsmask);
+ VectorSubtract(trace.endpos, mins, trace.endpos);
+ return trace;
+ }
+
if(!VectorCompare(start, pEnd) && collision_endposnudge.value > 0)
{
// TRICK: make the trace 1 qu longer!
}
else
VectorCopy(pEnd, end);
-#endif
-
+#else
if (VectorCompare(mins, maxs))
{
vec3_t shiftstart, shiftend;
VectorSubtract(trace.endpos, mins, trace.endpos);
return trace;
}
+#endif
VectorCopy(start, clipstart);
VectorCopy(end, clipend);