diff options
Diffstat (limited to 'src/qcommon/cm_trace.c')
-rw-r--r-- | src/qcommon/cm_trace.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/qcommon/cm_trace.c b/src/qcommon/cm_trace.c index 6c4751fb..fcfa17b3 100644 --- a/src/qcommon/cm_trace.c +++ b/src/qcommon/cm_trace.c @@ -934,7 +934,8 @@ get the first intersection of the ray with the sphere */ void CM_TraceThroughSphere( traceWork_t *tw, vec3_t origin, float radius, vec3_t start, vec3_t end ) { float l1, l2, length, scale, fraction; - float a, b, c, d, sqrtd; + //float a; + float b, c, d, sqrtd; vec3_t v1, dir, intersection; // if inside the sphere @@ -970,7 +971,7 @@ void CM_TraceThroughSphere( traceWork_t *tw, vec3_t origin, float radius, vec3_t // VectorSubtract(start, origin, v1); // dir is normalized so a = 1 - a = 1.0f;//dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]; + //a = 1.0f;//dir[0] * dir[0] + dir[1] * dir[1] + dir[2] * dir[2]; b = 2.0f * (dir[0] * v1[0] + dir[1] * v1[1] + dir[2] * v1[2]); c = v1[0] * v1[0] + v1[1] * v1[1] + v1[2] * v1[2] - (radius+RADIUS_EPSILON) * (radius+RADIUS_EPSILON); @@ -1022,7 +1023,8 @@ the cylinder extends halfheight above and below the origin */ void CM_TraceThroughVerticalCylinder( traceWork_t *tw, vec3_t origin, float radius, float halfheight, vec3_t start, vec3_t end) { float length, scale, fraction, l1, l2; - float a, b, c, d, sqrtd; + //float a; + float b, c, d, sqrtd; vec3_t v1, dir, start2d, end2d, org2d, intersection; // 2d coordinates @@ -1068,7 +1070,7 @@ void CM_TraceThroughVerticalCylinder( traceWork_t *tw, vec3_t origin, float radi // VectorSubtract(start, origin, v1); // dir is normalized so we can use a = 1 - a = 1.0f;// * (dir[0] * dir[0] + dir[1] * dir[1]); + //a = 1.0f;// * (dir[0] * dir[0] + dir[1] * dir[1]); b = 2.0f * (v1[0] * dir[0] + v1[1] * dir[1]); c = v1[0] * v1[0] + v1[1] * v1[1] - (radius+RADIUS_EPSILON) * (radius+RADIUS_EPSILON); |