Bug 5094 - Code cleanup, patch by Zack Middleton and DevHC. Fixes unused-but-set gcc warnings
This commit is contained in:
parent
1ea7ab1f42
commit
23f6fd1633
85 changed files with 246 additions and 496 deletions
|
@ -732,7 +732,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
|
||||
|
@ -768,7 +769,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);
|
||||
|
||||
|
@ -820,7 +821,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
|
||||
|
@ -866,7 +868,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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue