summaryrefslogtreecommitdiff
path: root/src/qcommon/cm_trace.c
diff options
context:
space:
mode:
authorThilo Schulz <arny@ats.s.bawue.de>2011-07-29 12:27:00 +0000
committerTim Angus <tim@ngus.net>2013-01-10 22:36:34 +0000
commite7c06719510940898e1f7f8215f4137202611308 (patch)
tree0aec0bf91daa568d8cb4a1c412037ca26b2f92a6 /src/qcommon/cm_trace.c
parent76544bcec46127587d183a90e5ff817a71e1f139 (diff)
Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
Diffstat (limited to 'src/qcommon/cm_trace.c')
-rw-r--r--src/qcommon/cm_trace.c10
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);