diff --git a/src/client/cl_console.c b/src/client/cl_console.c index c6ea993b..4e976390 100644 --- a/src/client/cl_console.c +++ b/src/client/cl_console.c @@ -363,7 +363,6 @@ void Con_CenteredPrint (char *text) { * typing goes beyond the right edge */ void Con_DrawInput (void) { - int y; int i; char *text; @@ -387,9 +386,6 @@ void Con_DrawInput (void) { if (key_linepos >= con.linewidth) text += 1 + key_linepos - con.linewidth; - /* draw it */ - y = con.vislines-16; - for (i=0 ; ipmove.origin[2] - ps->pmove.origin[2]) > 256*8) ops = ps; /* don't interpolate */ - ent = &cl_entities[cl.playernum+1]; lerp = cl.lerpfrac; /* calculate the origin */ diff --git a/src/client/menu/videomenu.c b/src/client/menu/videomenu.c index 6c1ac391..5cff2aa8 100644 --- a/src/client/menu/videomenu.c +++ b/src/client/menu/videomenu.c @@ -128,7 +128,6 @@ ResetDefaults ( void *unused ) static void ApplyChanges ( void *unused ) { - float gamma; int ref; /* make values consistent */ @@ -136,9 +135,6 @@ ApplyChanges ( void *unused ) s_brightness_slider [ !s_current_menu_index ].curvalue = s_brightness_slider [ s_current_menu_index ].curvalue; s_ref_list [ !s_current_menu_index ].curvalue = s_ref_list [ s_current_menu_index ].curvalue; - /* invert sense so greater = brighter, and scale to a range of 0.5 to 1.3 */ - gamma = ( 0.8 - ( s_brightness_slider [ s_current_menu_index ].curvalue / 10.0 - 0.5 ) ) + 0.5; - Cvar_SetValue( "gl_picmip", 3 - s_tq_slider.curvalue ); Cvar_SetValue( "vid_fullscreen", s_fs_box [ s_current_menu_index ].curvalue ); Cvar_SetValue( "gl_ext_palettedtexture", s_paletted_texture_box.curvalue ); diff --git a/src/common/filesystem.c b/src/common/filesystem.c index 95fb755a..69e989a1 100644 --- a/src/common/filesystem.c +++ b/src/common/filesystem.c @@ -532,16 +532,8 @@ FS_FCloseFile(fileHandle_t f) int Developer_searchpath(int who) { - int ch; - fsSearchPath_t *search; - if (who == 1) /* xatrix */ - ch = 'x'; - - else if (who == 2) /* rogue */ - ch = 'r'; - for (search = fs_searchPaths; search; search = search->next) { if (strstr(search->path, "xatrix")) diff --git a/src/common/netchan.c b/src/common/netchan.c index 997d5cb6..86828c7d 100644 --- a/src/common/netchan.c +++ b/src/common/netchan.c @@ -273,7 +273,6 @@ qboolean Netchan_Process (netchan_t *chan, sizebuf_t *msg) { unsigned sequence, sequence_ack; unsigned reliable_ack, reliable_message; - int qport; /* get sequence numbers */ MSG_BeginReading (msg); @@ -282,7 +281,7 @@ qboolean Netchan_Process (netchan_t *chan, sizebuf_t *msg) /* read the qport if we are a server */ if (chan->sock == NS_SERVER) - qport = MSG_ReadShort (msg); + (void)MSG_ReadShort(msg); reliable_message = sequence >> 31; reliable_ack = sequence_ack >> 31; diff --git a/src/game/g_chase.c b/src/game/g_chase.c index 8d8896b0..1630cba3 100644 --- a/src/game/g_chase.c +++ b/src/game/g_chase.c @@ -34,7 +34,6 @@ UpdateChaseCam(edict_t *ent) vec3_t forward, right; trace_t trace; int i; - vec3_t oldgoal; vec3_t angles; if (!ent) @@ -60,7 +59,6 @@ UpdateChaseCam(edict_t *ent) targ = ent->client->chase_target; VectorCopy(targ->s.origin, ownerv); - VectorCopy(ent->s.origin, oldgoal); ownerv[2] += targ->viewheight; diff --git a/src/game/g_func.c b/src/game/g_func.c index 97515bd8..a8e27a2c 100644 --- a/src/game/g_func.c +++ b/src/game/g_func.c @@ -571,10 +571,7 @@ plat_blocked(edict_t *self, edict_t *other) if (other) { /* Hack for entity without it's origin near the model */ - vec3_t save; - VectorCopy(other->s.origin,save); VectorMA (other->absmin, 0.5, other->size, other->s.origin); - BecomeExplosion1(other); } @@ -1608,10 +1605,7 @@ door_blocked(edict_t *self, edict_t *other) if (other) { /* Hack for entitiy without their origin near the model */ - vec3_t save; - VectorCopy(other->s.origin,save); VectorMA (other->absmin, 0.5, other->size, other->s.origin); - BecomeExplosion1(other); } @@ -2136,10 +2130,7 @@ train_blocked(edict_t *self, edict_t *other) if (other) { /* Hack for entity without an origin near the model */ - vec3_t save; - VectorCopy(other->s.origin,save); VectorMA (other->absmin, 0.5, other->size, other->s.origin); - BecomeExplosion1(other); } @@ -2836,10 +2827,7 @@ door_secret_blocked(edict_t *self, edict_t *other) if (other) { /* Hack for entities without their origin near the model */ - vec3_t save; - VectorCopy(other->s.origin,save); VectorMA (other->absmin, 0.5, other->size, other->s.origin); - BecomeExplosion1(other); } diff --git a/src/game/g_phys.c b/src/game/g_phys.c index 951cc274..ff293900 100644 --- a/src/game/g_phys.c +++ b/src/game/g_phys.c @@ -578,7 +578,6 @@ SV_Push(edict_t *pusher, vec3_t move, vec3_t amove) { int i, e; edict_t *check, *block; - vec3_t mins, maxs; pushed_t *p; vec3_t org, org2, move2, forward, right, up; vec3_t realmins, realmaxs; @@ -607,13 +606,6 @@ SV_Push(edict_t *pusher, vec3_t move, vec3_t amove) move[i] = 0.125 * (int)temp; } - /* find the bounding box */ - for (i = 0; i < 3; i++) - { - mins[i] = pusher->absmin[i] + move[i]; - maxs[i] = pusher->absmax[i] + move[i]; - } - /* we need this for pushing things later */ VectorSubtract(vec3_origin, amove, org); AngleVectors(org, forward, right, up); diff --git a/src/game/g_target.c b/src/game/g_target.c index 5d6003d3..d481a204 100644 --- a/src/game/g_target.c +++ b/src/game/g_target.c @@ -629,26 +629,11 @@ SP_target_spawner(edict_t *self) void use_target_blaster(edict_t *self, edict_t *other /* unused */, edict_t *activator /* unused */) { - int effect; - if (!self) { return; } - if (self->spawnflags & 2) - { - effect = 0; - } - else if (self->spawnflags & 1) - { - effect = EF_HYPERBLASTER; - } - else - { - effect = EF_BLASTER; - } - fire_blaster(self, self->s.origin, self->movedir, self->dmg, self->speed, EF_BLASTER, MOD_TARGET_BLASTER); gi.sound(self, CHAN_VOICE, self->noise_index, 1, ATTN_NORM, 0); diff --git a/src/game/monster/boss2/boss2.c b/src/game/monster/boss2/boss2.c index b0bf52c8..20783208 100644 --- a/src/game/monster/boss2/boss2.c +++ b/src/game/monster/boss2/boss2.c @@ -674,7 +674,6 @@ Boss2_CheckAttack(edict_t *self) vec3_t temp; float chance; trace_t tr; - qboolean enemy_infront; int enemy_range; float enemy_yaw; @@ -702,7 +701,6 @@ Boss2_CheckAttack(edict_t *self) } } - enemy_infront = infront(self, self->enemy); enemy_range = range(self, self->enemy); VectorSubtract(self->enemy->s.origin, self->s.origin, temp); enemy_yaw = vectoyaw(temp); diff --git a/src/game/monster/boss3/boss31.c b/src/game/monster/boss3/boss31.c index f3699f1e..f53103ab 100644 --- a/src/game/monster/boss3/boss31.c +++ b/src/game/monster/boss3/boss31.c @@ -726,17 +726,11 @@ jorg_firebullet(edict_t *self) void jorg_attack(edict_t *self) { - vec3_t vec; - float range; - if (!self) { return; } - VectorSubtract(self->enemy->s.origin, self->s.origin, vec); - range = VectorLength(vec); - if (random() <= 0.75) { gi.sound(self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM, 0); diff --git a/src/game/monster/boss3/boss32.c b/src/game/monster/boss3/boss32.c index 3e4944ed..24dae207 100644 --- a/src/game/monster/boss3/boss32.c +++ b/src/game/monster/boss3/boss32.c @@ -797,8 +797,6 @@ makron_sight(edict_t *self, edict_t *other /* unused */) void makron_attack(edict_t *self) { - vec3_t vec; - float range; float r; if (!self) @@ -808,9 +806,6 @@ makron_attack(edict_t *self) r = random(); - VectorSubtract(self->enemy->s.origin, self->s.origin, vec); - range = VectorLength(vec); - if (r <= 0.3) { self->monsterinfo.currentmove = &makron_move_attack3; @@ -946,7 +941,6 @@ Makron_CheckAttack(edict_t *self) vec3_t temp; float chance; trace_t tr; - qboolean enemy_infront; int enemy_range; float enemy_yaw; @@ -974,7 +968,6 @@ Makron_CheckAttack(edict_t *self) } } - enemy_infront = infront(self, self->enemy); enemy_range = range(self, self->enemy); VectorSubtract(self->enemy->s.origin, self->s.origin, temp); enemy_yaw = vectoyaw(temp); diff --git a/src/game/player/hud.c b/src/game/player/hud.c index a5a5eecf..1cfa7f60 100644 --- a/src/game/player/hud.c +++ b/src/game/player/hud.c @@ -212,7 +212,6 @@ DeathmatchScoreboardMessage(edict_t *ent, edict_t *killer) int sorted[MAX_CLIENTS]; int sortedscores[MAX_CLIENTS]; int score, total; - int picnum; int x, y; gclient_t *cl; edict_t *cl_ent; @@ -272,7 +271,6 @@ DeathmatchScoreboardMessage(edict_t *ent, edict_t *killer) cl = &game.clients[sorted[i]]; cl_ent = g_edicts + 1 + sorted[i]; - picnum = gi.imageindex("i_fixme"); x = (i >= 6) ? 160 : 0; y = 32 + 32 * (i % 6); diff --git a/src/refresh/r_light.c b/src/refresh/r_light.c index c7f9332b..fc546220 100644 --- a/src/refresh/r_light.c +++ b/src/refresh/r_light.c @@ -315,7 +315,6 @@ R_LightPoint ( vec3_t p, vec3_t color ) float r; int lnum; dlight_t *dl; - float light; vec3_t dist; float add; @@ -341,7 +340,6 @@ R_LightPoint ( vec3_t p, vec3_t color ) } /* add dynamic lights */ - light = 0; dl = r_newrefdef.dlights; for ( lnum = 0; lnum < r_newrefdef.num_dlights; lnum++, dl++ ) @@ -477,7 +475,6 @@ R_BuildLightMap ( msurface_t *surf, byte *dest, int stride ) float scale [ 4 ]; int nummaps; float *bl; - lightstyle_t *style; if ( surf->texinfo->flags & ( SURF_SKY | SURF_TRANS33 | SURF_TRANS66 | SURF_WARP ) ) { @@ -496,19 +493,11 @@ R_BuildLightMap ( msurface_t *surf, byte *dest, int stride ) /* set to full bright if no light data */ if ( !surf->samples ) { - int maps; - for ( i = 0; i < size * 3; i++ ) { s_blocklights [ i ] = 255; } - for ( maps = 0; maps < MAXLIGHTMAPS && surf->styles [ maps ] != 255; - maps++ ) - { - style = &r_newrefdef.lightstyles [ surf->styles [ maps ] ]; - } - goto store; } diff --git a/src/refresh/r_lightmap.c b/src/refresh/r_lightmap.c index 595cf419..1bc02092 100644 --- a/src/refresh/r_lightmap.c +++ b/src/refresh/r_lightmap.c @@ -146,7 +146,6 @@ LM_BuildPolygonFromSurface ( msurface_t *fa ) { int i, lindex, lnumverts; medge_t *pedges, *r_pedge; - int vertpage; float *vec; float s, t; glpoly_t *poly; @@ -155,7 +154,6 @@ LM_BuildPolygonFromSurface ( msurface_t *fa ) /* reconstruct the polygon */ pedges = currentmodel->edges; lnumverts = fa->numedges; - vertpage = 0; VectorClear( total ); diff --git a/src/refresh/r_mesh.c b/src/refresh/r_mesh.c index 67fc659c..6c28a662 100644 --- a/src/refresh/r_mesh.c +++ b/src/refresh/r_mesh.c @@ -294,23 +294,14 @@ R_DrawAliasFrameLerp ( dmdl_t *paliashdr, float backlerp ) void R_DrawAliasShadow ( dmdl_t *paliashdr, int posenum ) { - dtrivertx_t *verts; int *order; vec3_t point; float height, lheight; int count; - daliasframe_t *frame; lheight = currententity->origin [ 2 ] - lightspot [ 2 ]; - - frame = (daliasframe_t *) ( (byte *) paliashdr + paliashdr->ofs_frames - + currententity->frame * paliashdr->framesize ); - verts = frame->verts; - height = 0; - order = (int *) ( (byte *) paliashdr + paliashdr->ofs_glcmds ); - height = -lheight + 0.1f; /* stencilbuffer shadows */ diff --git a/src/server/sv_world.c b/src/server/sv_world.c index 77510316..cb093446 100644 --- a/src/server/sv_world.c +++ b/src/server/sv_world.c @@ -403,9 +403,6 @@ SV_AreaEdicts_r ( areanode_t *node ) { link_t *l, *next, *start; edict_t *check; - int count; - - count = 0; /* touch linked edicts */ if ( area_type == AREA_SOLID ) diff --git a/src/unix/network.c b/src/unix/network.c index 15aa9bbe..b2624ba0 100644 --- a/src/unix/network.c +++ b/src/unix/network.c @@ -269,7 +269,6 @@ NET_BaseAdrToString(netadr_t a) static char s[64], tmp[64]; struct sockaddr_storage ss; struct sockaddr_in6 *s6; - int flags; switch (a.type) { @@ -308,15 +307,12 @@ NET_BaseAdrToString(netadr_t a) memcpy(&s6->sin6_addr, a.ip, sizeof(struct in6_addr)); } - flags = NI_NUMERICHOST; - #ifdef __FreeBSD__ - if (getnameinfo((struct sockaddr *)&ss, ss.ss_len, s, sizeof(s), - NULL, 0, NI_NUMERICHOST)) + socklen_t const salen = ss.ss_len; #else - if (getnameinfo((struct sockaddr *)&ss, sizeof(ss), s, sizeof(s), - NULL, 0, NI_NUMERICHOST)) + socklen_t const salen = sizeof(ss); #endif + if (getnameinfo((struct sockaddr*)&ss, salen, s, sizeof(s), NULL, 0, NI_NUMERICHOST)) { Com_sprintf(s, sizeof(s), ""); }