vec_t backdist1;
vec_t backdist2;
vec_t backfrac;
- vec3_t clipped[2];
+ vec3_t clipped, newstart, newend;
#endif
vec3_t segmentmins;
vec3_t segmentmaxs;
// START end START END
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[0]);
- start = clipped[0];
+ VectorLerp(start, frontfrac, end, newstart); start = newstart;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
#ifdef BIHLINECLIP
// start END START END
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[0]);
- end = clipped[0];
+ VectorLerp(start, frontfrac, end, newend); end = newend;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, end, linestart, lineend);
#ifdef BIHLINECLIP
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- end = clipped[0];
+ VectorLerp(start, backfrac, end, newend); end = newend;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// START end start END
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped[1], end, linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped, end, linestart, lineend);
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- end = clipped[0];
+ VectorLerp(start, backfrac, end, newend); end = newend;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// start END start END
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped[1], linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped, linestart, lineend);
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- end = clipped[0];
+ VectorLerp(start, backfrac, end, newend); end = newend;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// START END start END
#ifdef BIHLINECLIP
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- end = clipped[0];
+ VectorLerp(start, backfrac, end, newend); end = newend;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, end, linestart, lineend);
#ifdef BIHLINECLIP
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- start = clipped[0];
+ VectorLerp(start, backfrac, end, newstart); start = newstart;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// START end START end
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped[1], end, linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped, end, linestart, lineend);
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- start = clipped[0];
+ VectorLerp(start, backfrac, end, newstart); start = newstart;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// start END START end
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped[1], linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped, linestart, lineend);
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- start = clipped[0];
+ VectorLerp(start, backfrac, end, newstart); start = newstart;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// START END START end
#ifdef BIHLINECLIP
backfrac = backdist1 / (backdist1 - backdist2);
- VectorLerp(start, backfrac, end, clipped[0]);
- start = clipped[0];
+ VectorLerp(start, backfrac, end, newstart); start = newstart;
segmentmins[0] = min(start[0], end[0]);
segmentmins[1] = min(start[1], end[1]);
segmentmins[2] = min(start[2], end[2]);
// START end start end
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped[1], end, linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, clipped, end, linestart, lineend);
#else
Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, end, linestart, lineend);
#endif
// start END start end
#ifdef BIHLINECLIP
frontfrac = frontdist1 / (frontdist1 - frontdist2);
- VectorLerp(start, frontfrac, end, clipped[1]);
- Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped[1], linestart, lineend);
+ VectorLerp(start, frontfrac, end, clipped);
+ Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, clipped, linestart, lineend);
#else
Mod_CollisionBIH_TraceLine_RecursiveBIHNode(trace, model, node->front, start, end, linestart, lineend);
#endif