Skip to content
Browse files

Remove unused variables.

  • Loading branch information...
1 parent 9165cf5 commit 8207be057a9ed42b45cf53f63de99fe9d3dc3574 @bnoordhuis committed
Showing with 8 additions and 75 deletions.
  1. +0 −2 aas_store.c
  2. +0 −3 brushbsp.c
  3. +1 −29 deps/botlib/be_aas_move.c
  4. +5 −15 deps/botlib/be_aas_reach.c
  5. +2 −4 deps/qcommon/cm_trace.c
  6. +0 −6 deps/qcommon/unzip.c
  7. +0 −8 map_q2.c
  8. +0 −4 map_q3.c
  9. +0 −4 map_sin.c
View
2 aas_store.c
@@ -654,7 +654,6 @@ qboolean AAS_FindPlane(vec3_t normal, float dist, int *planenum)
qboolean AAS_FindHashedPlane(vec3_t normal, float dist, int *planenum)
{
int i, p;
- aas_plane_t *plane;
int hash, h;
hash = (int)fabs(dist) / 8;
@@ -666,7 +665,6 @@ qboolean AAS_FindHashedPlane(vec3_t normal, float dist, int *planenum)
h = (hash+i)&(PLANE_HASH_SIZE-1);
for (p = aas_hashplanes[h]; p >= 0; p = aas_planechain[p])
{
- plane = &aasworld.planes[p];
if (AAS_PlaneEqual(normal, dist, p))
{
*planenum = p;
View
3 brushbsp.c
@@ -973,13 +973,11 @@ side_t *SelectSplitSide (bspbrush_t *brushes, node_t *node)
int s;
int front, back, both, facing, splits;
int bsplits;
- int bestsplits;
int epsilonbrush;
qboolean hintsplit = false;
bestside = NULL;
bestvalue = -99999;
- bestsplits = 0;
// the search order goes: visible-structural, visible-detail,
// nonvisible-structural, nonvisible-detail.
@@ -1067,7 +1065,6 @@ side_t *SelectSplitSide (bspbrush_t *brushes, node_t *node)
{
bestvalue = value;
bestside = side;
- bestsplits = splits;
for (test = brushes; test ; test = test->next)
test->side = test->testside;
} //end if
View
30 deps/botlib/be_aas_move.c
@@ -382,18 +382,6 @@ void AAS_Accelerate(vec3_t velocity, float frametime, vec3_t wishdir, float wish
}
} //end of the function AAS_Accelerate
//===========================================================================
-//
-// Parameter: -
-// Returns: -
-// Changes Globals: -
-//===========================================================================
-void AAS_AirControl(vec3_t start, vec3_t end, vec3_t velocity, vec3_t cmdmove)
-{
- vec3_t dir;
-
- VectorSubtract(end, start, dir);
-} //end of the function AAS_AirControl
-//===========================================================================
// applies ground friction to the given velocity
//
// Parameter: -
@@ -518,7 +506,7 @@ int AAS_ClientMovementPrediction(struct aas_clientmove_s *move,
float phys_maxstep, phys_maxsteepness, phys_jumpvel, friction;
float gravity, delta, maxvel, wishspeed, accelerate;
//float velchange, newvel;
- int n, i, j, pc, step, swimming, ax, crouch, event, jump_frame, areanum;
+ int n, i, j, pc, step, swimming, crouch, event, jump_frame, areanum;
int areas[20], numareas;
vec3_t points[20];
vec3_t org, end, feet, start, stepend, lastorg, wishdir;
@@ -574,7 +562,6 @@ int AAS_ClientMovementPrediction(struct aas_clientmove_s *move,
//apply command movement
if (n < cmdframes)
{
- ax = 0;
maxvel = phys_maxwalkvelocity;
accelerate = phys_airaccelerate;
VectorCopy(cmdmove, wishdir);
@@ -598,13 +585,11 @@ int AAS_ClientMovementPrediction(struct aas_clientmove_s *move,
{
accelerate = phys_walkaccelerate;
} //end else
- ax = 2;
} //end if
if (swimming)
{
maxvel = phys_maxswimvelocity;
accelerate = phys_swimaccelerate;
- ax = 3;
} //end if
else
{
@@ -616,19 +601,6 @@ int AAS_ClientMovementPrediction(struct aas_clientmove_s *move,
VectorScale(frame_test_vel, 1/frametime, frame_test_vel);
AAS_Accelerate(frame_test_vel, frametime, wishdir, wishspeed, accelerate);
VectorScale(frame_test_vel, frametime, frame_test_vel);
- /*
- for (i = 0; i < ax; i++)
- {
- velchange = (cmdmove[i] * frametime) - frame_test_vel[i];
- if (velchange > phys_maxacceleration) velchange = phys_maxacceleration;
- else if (velchange < -phys_maxacceleration) velchange = -phys_maxacceleration;
- newvel = frame_test_vel[i] + velchange;
- //
- if (frame_test_vel[i] <= maxvel && newvel > maxvel) frame_test_vel[i] = maxvel;
- else if (frame_test_vel[i] >= -maxvel && newvel < -maxvel) frame_test_vel[i] = -maxvel;
- else frame_test_vel[i] = newvel;
- } //end for
- */
} //end if
if (crouch)
{
View
20 deps/botlib/be_aas_reach.c
@@ -289,7 +289,7 @@ int AAS_GetJumpPadInfo(int ent, vec3_t areastart, vec3_t absmins, vec3_t absmaxs
//===========================================================================
int AAS_BestReachableFromJumpPadArea(vec3_t origin, vec3_t mins, vec3_t maxs)
{
- int area2num, ent, bot_visualizejumppads, bestareanum;
+ int ent, bot_visualizejumppads, bestareanum;
float volume, bestareavolume;
vec3_t areastart, cmdmove, bboxmins, bboxmaxs;
vec3_t absmins, absmaxs, velocity;
@@ -327,7 +327,6 @@ int AAS_BestReachableFromJumpPadArea(vec3_t origin, vec3_t mins, vec3_t maxs)
//
VectorSet(cmdmove, 0, 0, 0);
Com_Memset(&move, 0, sizeof(aas_clientmove_t));
- area2num = 0;
AAS_ClientMovementHitBBox(&move, -1, areastart, PRESENCE_NORMAL, qfalse,
velocity, cmdmove, 0, 30, 0.1f, bboxmins, bboxmaxs, bot_visualizejumppads);
if (move.frames < 30)
@@ -837,7 +836,6 @@ int AAS_Reachability_Swim(int area1num, int area2num)
{
int i, j, face1num, face2num, side1;
aas_area_t *area1, *area2;
- aas_areasettings_t *areasettings;
aas_lreachability_t *lreach;
aas_face_t *face1;
aas_plane_t *plane;
@@ -875,7 +873,6 @@ int AAS_Reachability_Swim(int area1num, int area2num)
{
//
face1 = &aasworld.faces[face1num];
- areasettings = &aasworld.areasettings[area1num];
//create a new reachability link
lreach = AAS_AllocReachability();
if (!lreach) return qfalse;
@@ -1062,7 +1059,7 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
int ground_bestarea2groundedgenum, ground_foundreach;
int water_bestarea2groundedgenum, water_foundreach;
int side1, area1swim, faceside1, groundface1num;
- float dist, dist1, dist2, diff, invgravitydot, ortdot;
+ float dist, dist1, dist2, diff, ortdot;
float x1, x2, x3, x4, y1, y2, y3, y4, tmp, y;
float length, ground_bestlength, water_bestlength, ground_bestdist, water_bestdist;
vec3_t v1, v2, v3, v4, tmpv, p1area1, p1area2, p2area1, p2area2;
@@ -1073,7 +1070,7 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
vec3_t testpoint;
aas_plane_t *plane;
aas_area_t *area1, *area2;
- aas_face_t *groundface1, *groundface2, *ground_bestface1, *water_bestface1;
+ aas_face_t *groundface1, *groundface2;
aas_edge_t *edge1, *edge2;
aas_lreachability_t *lreach;
aas_trace_t trace;
@@ -1172,7 +1169,6 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
//edges if they overlap in the direction orthogonal to
//the gravity direction
CrossProduct(invgravity, normal, ort);
- invgravitydot = DotProduct(invgravity, invgravity);
ortdot = DotProduct(ort, ort);
//projection into the step plane
//NOTE: since gravity is vertical this is just the z coordinate
@@ -1302,7 +1298,6 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
ground_bestlength = length;
ground_foundreach = qtrue;
ground_bestarea2groundedgenum = edge1num;
- ground_bestface1 = groundface1;
//best point towards area1
VectorCopy(start, ground_beststart);
//normal is pointing into area2
@@ -1323,7 +1318,6 @@ int AAS_Reachability_Step_Barrier_WaterJump_WalkOffLedge(int area1num, int area2
water_bestlength = length;
water_foundreach = qtrue;
water_bestarea2groundedgenum = edge1num;
- water_bestface1 = groundface1;
//best point towards area1
VectorCopy(start, water_beststart);
//normal is pointing into area2
@@ -3501,7 +3495,7 @@ void AAS_Reachability_JumpPad(void)
int face2num, i, ret, area2num, visualize, ent, bot_visualizejumppads;
//int modelnum, ent2;
//float dist, time, height, gravity, forward;
- float speed, zvel, hordist;
+ float speed, zvel;
aas_face_t *face2;
aas_area_t *area2;
aas_lreachability_t *lreach;
@@ -3723,8 +3717,6 @@ void AAS_Reachability_JumpPad(void)
//direction towards the face center
VectorSubtract(facecenter, areastart, dir);
dir[2] = 0;
- hordist = VectorNormalize(dir);
- //if (hordist < 1.6 * facecenter[2] - areastart[2])
{
//get command movement
VectorScale(dir, speed, cmdmove);
@@ -4006,7 +3998,7 @@ void AAS_SetWeaponJumpAreaFlags(void)
int AAS_Reachability_WeaponJump(int area1num, int area2num)
{
int face2num, i, n, ret, visualize;
- float speed, zvel, hordist;
+ float speed, zvel;
aas_face_t *face2;
aas_area_t *area1, *area2;
aas_lreachability_t *lreach;
@@ -4066,8 +4058,6 @@ int AAS_Reachability_WeaponJump(int area1num, int area2num)
//direction towards the face center
VectorSubtract(facecenter, areastart, dir);
dir[2] = 0;
- hordist = VectorNormalize(dir);
- //if (hordist < 1.6 * (facecenter[2] - areastart[2]))
{
//get command movement
VectorScale(dir, speed, cmdmove);
View
6 deps/qcommon/cm_trace.c
@@ -728,7 +728,7 @@ 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 b, c, d, sqrtd;
vec3_t v1, dir, intersection;
// if inside the sphere
@@ -764,7 +764,6 @@ 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];
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);
@@ -816,7 +815,7 @@ 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 b, c, d, sqrtd;
vec3_t v1, dir, start2d, end2d, org2d, intersection;
// 2d coordinates
@@ -862,7 +861,6 @@ 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]);
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);
View
6 deps/qcommon/unzip.c
@@ -2042,12 +2042,10 @@ extern int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
else
{
uLong uTotalOutBefore,uTotalOutAfter;
- const Byte *bufBefore;
uLong uOutThis;
int flush=Z_SYNC_FLUSH;
uTotalOutBefore = pfile_in_zip_read_info->stream.total_out;
- bufBefore = pfile_in_zip_read_info->stream.next_out;
/*
if ((pfile_in_zip_read_info->rest_read_uncompressed ==
@@ -2060,10 +2058,6 @@ extern int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
uTotalOutAfter = pfile_in_zip_read_info->stream.total_out;
uOutThis = uTotalOutAfter-uTotalOutBefore;
-// pfile_in_zip_read_info->crc32 =
-// crc32(pfile_in_zip_read_info->crc32,bufBefore,
-// (uInt)(uOutThis));
-
pfile_in_zip_read_info->rest_read_uncompressed -=
uOutThis;
View
8 map_q2.c
@@ -494,7 +494,6 @@ qboolean Q2_ParseMapEntity(script_t *script)
epair_t *e;
side_t *s;
int i, j;
- int startbrush, startsides;
vec_t newdist;
mapbrush_t *b;
token_t token;
@@ -507,9 +506,6 @@ qboolean Q2_ParseMapEntity(script_t *script)
if (num_entities == MAX_MAP_ENTITIES)
Error ("num_entities == MAX_MAP_ENTITIES");
- startbrush = nummapbrushes;
- startsides = nummapbrushsides;
-
mapent = &entities[num_entities];
num_entities++;
memset (mapent, 0, sizeof(*mapent));
@@ -994,10 +990,6 @@ qboolean Q2_ParseBSPEntity(int entnum)
{
entity_t *mapent;
char *model;
- int startbrush, startsides;
-
- startbrush = nummapbrushes;
- startsides = nummapbrushsides;
mapent = &entities[entnum];//num_entities];
mapent->firstbrush = nummapbrushes;
View
4 map_q3.c
@@ -390,10 +390,6 @@ qboolean Q3_ParseBSPEntity(int entnum)
{
entity_t *mapent;
char *model;
- int startbrush, startsides;
-
- startbrush = nummapbrushes;
- startsides = nummapbrushsides;
mapent = &entities[entnum];//num_entities];
mapent->firstbrush = nummapbrushes;
View
4 map_sin.c
@@ -1103,10 +1103,6 @@ qboolean Sin_ParseBSPEntity(int entnum)
{
entity_t *mapent;
char *model;
- int startbrush, startsides;
-
- startbrush = nummapbrushes;
- startsides = nummapbrushsides;
mapent = &entities[entnum];//num_entities];
mapent->firstbrush = nummapbrushes;

0 comments on commit 8207be0

Please sign in to comment.
Something went wrong with that request. Please try again.