const colbrushf_t *brush;
const int *e;
const texture_t *texture;
- vec3_t start, end, startmins, startmaxs, endmins, endmaxs, mins, maxs;
+ vec3_t start, end, startmaxs, endmaxs, mins, maxs;
vec3_t nodebigmins, nodebigmaxs, nodestart, nodeend, sweepnodemins, sweepnodemaxs;
vec_t d1, d2, d3, d4, f, nodestackline[1024][6];
int axis, nodenum, nodestackpos = 0, nodestack[1024];
VectorAdd(thisbrush_end->mins, thisbrush_end->maxs, end);
VectorM(0.5f, start, start);
VectorM(0.5f, end, end);
- VectorSubtract(thisbrush_start->mins, start, startmins);
VectorSubtract(thisbrush_start->maxs, start, startmaxs);
- VectorSubtract(thisbrush_end->mins, end, endmins);
VectorSubtract(thisbrush_end->maxs, end, endmaxs);
- mins[0] = min(startmins[0], endmins[0]);
- mins[1] = min(startmins[1], endmins[1]);
- mins[2] = min(startmins[2], endmins[2]);
maxs[0] = max(startmaxs[0], endmaxs[0]);
maxs[1] = max(startmaxs[1], endmaxs[1]);
maxs[2] = max(startmaxs[2], endmaxs[2]);
+ VectorNegate(maxs, mins);
// push first node
nodestackline[nodestackpos][0] = start[0];