mirror of
https://github.com/yquake2/zaero.git
synced 2024-11-22 03:51:13 +00:00
Fix compiler warnings
src/g_items.c:2869:6: warning: variable ‘index’ set but not used [-Wunused-but-set-variable] src/g_phys.c:535:10: warning: variable ‘mins’ set but not used [-Wunused-but-set-variable] src/g_phys.c:535:16: warning: variable ‘maxs’ set but not used [-Wunused-but-set-variable] src/g_spawn.c:575:6: warning: variable ‘oldmaxent’ set but not used [-Wunused-but-set-variable] src/g_target.c:537:6: warning: variable ‘effect’ set but not used [-Wunused-but-set-variable] src/monster/boss2/boss2.c:564:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable] src/monster/boss3/boss31.c:601:8: warning: variable ‘range’ set but not used [-Wunused-but-set-variable] src/monster/boss3/boss31.c:650:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable] src/monster/boss3/boss32.c:678:8: warning: variable ‘range’ set but not used [-Wunused-but-set-variable] src/monster/boss3/boss32.c:811:11: warning: variable ‘enemy_infront’ set but not used [-Wunused-but-set-variable] src/monster/boss/boss.c:797:8: warning: variable ‘length’ set but not used [-Wunused-but-set-variable] src/player/hud.c:167:7: warning: variable ‘picnum’ set but not used [-Wunused-but-set-variable]
This commit is contained in:
parent
7275a593a6
commit
fda7c543b8
9 changed files with 146 additions and 187 deletions
|
@ -2866,8 +2866,8 @@ void SetItemNames (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
gitem_t *it;
|
gitem_t *it;
|
||||||
int index;
|
|
||||||
for (i=0, index = 0; i<game.num_items ; i++)
|
for (i=0; i<game.num_items ; i++)
|
||||||
{
|
{
|
||||||
it = &itemlist[i];
|
it = &itemlist[i];
|
||||||
gi.configstring (CS_ITEMS+i, it->pickup_name);
|
gi.configstring (CS_ITEMS+i, it->pickup_name);
|
||||||
|
|
|
@ -532,7 +532,6 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
{
|
{
|
||||||
int i, e;
|
int i, e;
|
||||||
edict_t *check, *block;
|
edict_t *check, *block;
|
||||||
vec3_t mins, maxs;
|
|
||||||
pushed_t *p;
|
pushed_t *p;
|
||||||
vec3_t org, org2, move2, forward, right, up;
|
vec3_t org, org2, move2, forward, right, up;
|
||||||
vec3_t realmins, realmaxs;
|
vec3_t realmins, realmaxs;
|
||||||
|
@ -555,13 +554,6 @@ qboolean SV_Push (edict_t *pusher, vec3_t move, vec3_t amove)
|
||||||
move[i] = 0.125 * (int)temp;
|
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
|
// we need this for pushing things later
|
||||||
VectorSubtract (vec3_origin, amove, org);
|
VectorSubtract (vec3_origin, amove, org);
|
||||||
AngleVectors (org, forward, right, up);
|
AngleVectors (org, forward, right, up);
|
||||||
|
|
|
@ -572,7 +572,6 @@ void SpawnEntities (const char *mapname, char *entities, const char *spawnpoint)
|
||||||
const char *com_token;
|
const char *com_token;
|
||||||
int i;
|
int i;
|
||||||
float skill_level;
|
float skill_level;
|
||||||
int oldmaxent;
|
|
||||||
|
|
||||||
skill_level = floor (skill->value);
|
skill_level = floor (skill->value);
|
||||||
if (skill_level < 0)
|
if (skill_level < 0)
|
||||||
|
@ -679,8 +678,6 @@ void SpawnEntities (const char *mapname, char *entities, const char *spawnpoint)
|
||||||
ED_CallSpawn (ent);
|
ED_CallSpawn (ent);
|
||||||
}
|
}
|
||||||
|
|
||||||
oldmaxent = globals.num_edicts;
|
|
||||||
|
|
||||||
gi.dprintf("%i entities created\n", globals.num_edicts);
|
gi.dprintf("%i entities created\n", globals.num_edicts);
|
||||||
gi.dprintf ("%i entities inhibited\n", inhibit);
|
gi.dprintf ("%i entities inhibited\n", inhibit);
|
||||||
|
|
||||||
|
|
|
@ -534,8 +534,6 @@ speed default is 1000
|
||||||
|
|
||||||
void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
|
void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
|
||||||
{
|
{
|
||||||
int effect;
|
|
||||||
|
|
||||||
if (!self)
|
if (!self)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
|
@ -547,13 +545,6 @@ void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
|
||||||
return;
|
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);
|
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);
|
gi.sound (self, CHAN_VOICE, self->noise_index, 1, ATTN_NORM, 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -794,7 +794,7 @@ mmove_t zboss_move_attack2b = {FRAME_attack2bStart, FRAME_attack2bEnd, zboss_fra
|
||||||
void HookDragThink (edict_t *self)
|
void HookDragThink (edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t dir, vec;
|
vec3_t dir, vec;
|
||||||
float length, speed;
|
float speed;
|
||||||
vec3_t hookoffset = {-5, -24, 34};
|
vec3_t hookoffset = {-5, -24, 34};
|
||||||
vec3_t forward, right;
|
vec3_t forward, right;
|
||||||
|
|
||||||
|
@ -809,7 +809,6 @@ void HookDragThink (edict_t *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorSubtract (self->owner->s.origin, self->s.origin, dir);
|
VectorSubtract (self->owner->s.origin, self->s.origin, dir);
|
||||||
length = VectorLength (dir);
|
|
||||||
|
|
||||||
AngleVectors (self->owner->s.angles, forward, right, NULL);
|
AngleVectors (self->owner->s.angles, forward, right, NULL);
|
||||||
G_ProjectSource(self->owner->s.origin, hookoffset, forward, right, vec);
|
G_ProjectSource(self->owner->s.origin, hookoffset, forward, right, vec);
|
||||||
|
|
|
@ -561,7 +561,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
||||||
vec3_t temp;
|
vec3_t temp;
|
||||||
float chance;
|
float chance;
|
||||||
trace_t tr;
|
trace_t tr;
|
||||||
qboolean enemy_infront;
|
|
||||||
int enemy_range;
|
int enemy_range;
|
||||||
float enemy_yaw;
|
float enemy_yaw;
|
||||||
|
|
||||||
|
@ -585,7 +584,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
enemy_infront = infront(self, self->enemy);
|
|
||||||
enemy_range = range(self, self->enemy);
|
enemy_range = range(self, self->enemy);
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||||
enemy_yaw = vectoyaw(temp);
|
enemy_yaw = vectoyaw(temp);
|
||||||
|
|
|
@ -597,17 +597,11 @@ void jorg_firebullet (edict_t *self)
|
||||||
|
|
||||||
void jorg_attack(edict_t *self)
|
void jorg_attack(edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t vec;
|
|
||||||
float range;
|
|
||||||
|
|
||||||
if (!self)
|
if (!self)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
|
||||||
range = VectorLength (vec);
|
|
||||||
|
|
||||||
if (random() <= 0.75)
|
if (random() <= 0.75)
|
||||||
{
|
{
|
||||||
gi.sound (self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM,0);
|
gi.sound (self, CHAN_VOICE, sound_attack1, 1, ATTN_NORM,0);
|
||||||
|
@ -647,7 +641,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
||||||
vec3_t temp;
|
vec3_t temp;
|
||||||
float chance;
|
float chance;
|
||||||
trace_t tr;
|
trace_t tr;
|
||||||
qboolean enemy_infront;
|
|
||||||
int enemy_range;
|
int enemy_range;
|
||||||
float enemy_yaw;
|
float enemy_yaw;
|
||||||
|
|
||||||
|
@ -671,7 +664,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
enemy_infront = infront(self, self->enemy);
|
|
||||||
enemy_range = range(self, self->enemy);
|
enemy_range = range(self, self->enemy);
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||||
enemy_yaw = vectoyaw(temp);
|
enemy_yaw = vectoyaw(temp);
|
||||||
|
|
|
@ -674,8 +674,6 @@ void makron_sight(edict_t *self, edict_t *other)
|
||||||
|
|
||||||
void makron_attack(edict_t *self)
|
void makron_attack(edict_t *self)
|
||||||
{
|
{
|
||||||
vec3_t vec;
|
|
||||||
float range;
|
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
if (!self)
|
if (!self)
|
||||||
|
@ -685,10 +683,6 @@ void makron_attack(edict_t *self)
|
||||||
|
|
||||||
r = random();
|
r = random();
|
||||||
|
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, vec);
|
|
||||||
range = VectorLength (vec);
|
|
||||||
|
|
||||||
|
|
||||||
if (r <= 0.3)
|
if (r <= 0.3)
|
||||||
self->monsterinfo.currentmove = &makron_move_attack3;
|
self->monsterinfo.currentmove = &makron_move_attack3;
|
||||||
else if (r <= 0.6)
|
else if (r <= 0.6)
|
||||||
|
@ -808,7 +802,6 @@ qboolean Makron_CheckAttack (edict_t *self)
|
||||||
vec3_t temp;
|
vec3_t temp;
|
||||||
float chance;
|
float chance;
|
||||||
trace_t tr;
|
trace_t tr;
|
||||||
qboolean enemy_infront;
|
|
||||||
int enemy_range;
|
int enemy_range;
|
||||||
float enemy_yaw;
|
float enemy_yaw;
|
||||||
|
|
||||||
|
@ -832,7 +825,6 @@ qboolean Makron_CheckAttack (edict_t *self)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
enemy_infront = infront(self, self->enemy);
|
|
||||||
enemy_range = range(self, self->enemy);
|
enemy_range = range(self, self->enemy);
|
||||||
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
VectorSubtract (self->enemy->s.origin, self->s.origin, temp);
|
||||||
enemy_yaw = vectoyaw(temp);
|
enemy_yaw = vectoyaw(temp);
|
||||||
|
|
|
@ -164,7 +164,6 @@ void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
int sorted[MAX_CLIENTS];
|
int sorted[MAX_CLIENTS];
|
||||||
int sortedscores[MAX_CLIENTS];
|
int sortedscores[MAX_CLIENTS];
|
||||||
int score, total;
|
int score, total;
|
||||||
int picnum;
|
|
||||||
int x, y;
|
int x, y;
|
||||||
gclient_t *cl;
|
gclient_t *cl;
|
||||||
edict_t *cl_ent;
|
edict_t *cl_ent;
|
||||||
|
@ -212,7 +211,6 @@ void DeathmatchScoreboardMessage (edict_t *ent, edict_t *killer)
|
||||||
cl = &game.clients[sorted[i]];
|
cl = &game.clients[sorted[i]];
|
||||||
cl_ent = g_edicts + 1 + sorted[i];
|
cl_ent = g_edicts + 1 + sorted[i];
|
||||||
|
|
||||||
picnum = gi.imageindex ("i_fixme");
|
|
||||||
x = (i>=6) ? 160 : 0;
|
x = (i>=6) ? 160 : 0;
|
||||||
y = 32 + 32 * (i%6);
|
y = 32 + 32 * (i%6);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue