Merge pull request #16 from 0lvin/master

Fix compiler warnings
This commit is contained in:
Yamagi 2021-01-27 08:28:07 +01:00 committed by GitHub
commit f3912680ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 160 additions and 200 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/build/
/release/

View file

@ -2866,8 +2866,8 @@ void SetItemNames (void)
{
int i;
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];
gi.configstring (CS_ITEMS+i, it->pickup_name);

View file

@ -532,7 +532,6 @@ qboolean 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;
@ -555,13 +554,6 @@ qboolean 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);

View file

@ -572,7 +572,6 @@ void SpawnEntities (const char *mapname, char *entities, const char *spawnpoint)
const char *com_token;
int i;
float skill_level;
int oldmaxent;
skill_level = floor (skill->value);
if (skill_level < 0)
@ -679,8 +678,6 @@ void SpawnEntities (const char *mapname, char *entities, const char *spawnpoint)
ED_CallSpawn (ent);
}
oldmaxent = globals.num_edicts;
gi.dprintf("%i entities created\n", globals.num_edicts);
gi.dprintf ("%i entities inhibited\n", inhibit);

View file

@ -534,8 +534,6 @@ speed default is 1000
void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
{
int effect;
if (!self)
{
return;
@ -547,13 +545,6 @@ void use_target_blaster (edict_t *self, edict_t *other, edict_t *activator)
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);
}

View file

@ -288,7 +288,7 @@ Must NOT be on the team with the rest of the turret parts.
Instead it must target the turret_breach.
*/
void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage);
void infantry_die (edict_t *self, edict_t *inflictor, edict_t *attacker, int damage, vec3_t point);
void infantry_stand (edict_t *self);
void monster_use (edict_t *self, edict_t *other, edict_t *activator);
@ -314,7 +314,7 @@ void turret_driver_die (edict_t *self, edict_t *inflictor, edict_t *attacker, in
self->target_ent->owner = NULL;
self->target_ent->teammaster->owner = NULL;
infantry_die (self, inflictor, attacker, damage);
infantry_die (self, inflictor, attacker, damage, point);
}
qboolean FindTarget (edict_t *self);

View file

@ -794,7 +794,7 @@ mmove_t zboss_move_attack2b = {FRAME_attack2bStart, FRAME_attack2bEnd, zboss_fra
void HookDragThink (edict_t *self)
{
vec3_t dir, vec;
float length, speed;
float speed;
vec3_t hookoffset = {-5, -24, 34};
vec3_t forward, right;
@ -809,7 +809,6 @@ void HookDragThink (edict_t *self)
}
VectorSubtract (self->owner->s.origin, self->s.origin, dir);
length = VectorLength (dir);
AngleVectors (self->owner->s.angles, forward, right, NULL);
G_ProjectSource(self->owner->s.origin, hookoffset, forward, right, vec);

View file

@ -561,7 +561,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
vec3_t temp;
float chance;
trace_t tr;
qboolean enemy_infront;
int enemy_range;
float enemy_yaw;
@ -585,7 +584,6 @@ qboolean Boss2_CheckAttack (edict_t *self)
return false;
}
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);

View file

@ -597,17 +597,11 @@ void 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);
@ -647,7 +641,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
vec3_t temp;
float chance;
trace_t tr;
qboolean enemy_infront;
int enemy_range;
float enemy_yaw;
@ -671,7 +664,6 @@ qboolean Jorg_CheckAttack (edict_t *self)
return false;
}
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);

View file

@ -674,8 +674,6 @@ void makron_sight(edict_t *self, edict_t *other)
void makron_attack(edict_t *self)
{
vec3_t vec;
float range;
float r;
if (!self)
@ -685,10 +683,6 @@ void 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;
else if (r <= 0.6)
@ -808,7 +802,6 @@ qboolean Makron_CheckAttack (edict_t *self)
vec3_t temp;
float chance;
trace_t tr;
qboolean enemy_infront;
int enemy_range;
float enemy_yaw;
@ -832,7 +825,6 @@ qboolean Makron_CheckAttack (edict_t *self)
return false;
}
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);

View file

@ -140,7 +140,7 @@ void SP_info_player_coop(edict_t *self)
The deathmatch intermission point will be at one of these
Use 'angles' instead of 'angle', so you can set pitch or roll as well as yaw. 'pitch yaw roll'
*/
void SP_info_player_intermission(void)
void SP_info_player_intermission(edict_t *ent)
{
}

View file

@ -164,7 +164,6 @@ void 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;
@ -212,7 +211,6 @@ void 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);

View file

@ -404,7 +404,7 @@ extern void TossClientWeapon ( edict_t * self ) ;
extern void ClientObituary ( edict_t * self , edict_t * inflictor , edict_t * attacker ) ;
extern qboolean IsFemale ( edict_t * ent ) ;
extern void player_pain ( edict_t * self , edict_t * other , float kick , int damage ) ;
extern void SP_info_player_intermission ( void ) ;
extern void SP_info_player_intermission ( edict_t *ent ) ;
extern void SP_info_player_coop ( edict_t * self ) ;
extern void SP_info_player_deathmatch ( edict_t * self ) ;
extern void SP_info_player_start ( edict_t * self ) ;