Some warning fixes

This commit is contained in:
Richard Allen 2012-03-17 14:56:06 +00:00
parent e7b57ae5e4
commit 24549addf6
7 changed files with 24 additions and 25 deletions

View file

@ -1906,7 +1906,7 @@ static void CG_BreathPuffs(centity_t * cent, refEntity_t * head)
clientInfo_t *ci; clientInfo_t *ci;
vec3_t dir, origin; vec3_t dir, origin;
int contents, i; int contents, i;
localEntity_t *puff[NUM_BREATH_PUFFS]; // localEntity_t *puff[NUM_BREATH_PUFFS];
ci = &cgs.clientinfo[cent->currentState.number]; ci = &cgs.clientinfo[cent->currentState.number];
@ -1947,7 +1947,8 @@ static void CG_BreathPuffs(centity_t * cent, refEntity_t * head)
//up-down //up-down
VectorMA(dir, -0.3f + crandom() * 0.3f, head->axis[2], dir); VectorMA(dir, -0.3f + crandom() * 0.3f, head->axis[2], dir);
VectorScale(dir, 3+random()*3, dir); VectorScale(dir, 3+random()*3, dir);
puff[i] = CG_SmokePuff(origin, dir, 3.5f+crandom()*0.5f, 1, 1, 1, 0.15f+crandom()*0.05f, 1000+random()*500, cg.time, 0, //puff[i] = CG_SmokePuff(origin, dir, 3.5f+crandom()*0.5f, 1, 1, 1, 0.15f+crandom()*0.05f, 1000+random()*500, cg.time, 0,
CG_SmokePuff(origin, dir, 3.5f+crandom()*0.5f, 1, 1, 1, 0.15f+crandom()*0.05f, 1000+random()*500, cg.time, 0,
LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader); LEF_PUFF_DONT_SCALE, cgs.media.shotgunSmokePuffShader);
} }

View file

@ -746,7 +746,7 @@ void ClientEvents(gentity_t * ent, int oldEventSequence)
int event; int event;
gclient_t *client; gclient_t *client;
int damage; int damage;
vec3_t dir; // vec3_t dir;
vec3_t origin, angles; vec3_t origin, angles;
gitem_t *item; gitem_t *item;
gentity_t *drop; gentity_t *drop;
@ -775,7 +775,7 @@ void ClientEvents(gentity_t * ent, int oldEventSequence)
} }
damage = ent->client->ps.stats[STAT_FALLDAMAGE]; damage = ent->client->ps.stats[STAT_FALLDAMAGE];
VectorSet(dir, 0, 0, 1); // VectorSet(dir, 0, 0, 1);
ent->pain_debounce_time = level.time + 200; // no normal pain sound ent->pain_debounce_time = level.time + 200; // no normal pain sound
//Elder: added so we can trigger AQ2 pain blends //Elder: added so we can trigger AQ2 pain blends
ent->client->ps.damageEvent++; ent->client->ps.damageEvent++;
@ -806,7 +806,7 @@ void ClientEvents(gentity_t * ent, int oldEventSequence)
} }
damage = ent->client->ps.stats[STAT_FALLDAMAGE]; damage = ent->client->ps.stats[STAT_FALLDAMAGE];
VectorSet(dir, 0, 0, 1); // VectorSet(dir, 0, 0, 1);
ent->pain_debounce_time = level.time + 200; // no normal pain sound ent->pain_debounce_time = level.time + 200; // no normal pain sound
//Elder: added so we can trigger AQ2 pain blends //Elder: added so we can trigger AQ2 pain blends
ent->client->ps.damageEvent++; ent->client->ps.damageEvent++;
@ -1461,14 +1461,14 @@ while a slow client may have multiple ClientEndFrame between ClientThink.
void ClientEndFrame(gentity_t * ent) void ClientEndFrame(gentity_t * ent)
{ {
int i, frames; int i, frames;
clientPersistant_t *pers; // clientPersistant_t *pers;
if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) { if (ent->client->sess.sessionTeam == TEAM_SPECTATOR) {
SpectatorClientEndFrame(ent); SpectatorClientEndFrame(ent);
return; return;
} }
pers = &ent->client->pers; // pers = &ent->client->pers;
// turn off any expired powerups // turn off any expired powerups
for (i = 0; i < MAX_POWERUPS; i++) { for (i = 0; i < MAX_POWERUPS; i++) {

View file

@ -47,7 +47,8 @@ void UpdateTournamentInfo(void)
int i; int i;
gentity_t *player; gentity_t *player;
int playerClientNum; int playerClientNum;
int n, accuracy, perfect, msglen; //int n, accuracy, perfect, msglen;
int n, msglen;
char buf[32]; char buf[32];
char msg[MAX_STRING_CHARS]; char msg[MAX_STRING_CHARS];
@ -73,7 +74,7 @@ void UpdateTournamentInfo(void)
CalculateRanks(); CalculateRanks();
if (level.clients[playerClientNum].sess.sessionTeam == TEAM_SPECTATOR) { /* if (level.clients[playerClientNum].sess.sessionTeam == TEAM_SPECTATOR) {
Com_sprintf(msg, sizeof(msg), "postgame %i %i 0 0 0 0 0 0", level.numNonSpectatorClients, Com_sprintf(msg, sizeof(msg), "postgame %i %i 0 0 0 0 0 0", level.numNonSpectatorClients,
playerClientNum); playerClientNum);
} else { } else {
@ -85,11 +86,11 @@ void UpdateTournamentInfo(void)
perfect = (level.clients[playerClientNum].ps.persistant[PERS_RANK] == 0 perfect = (level.clients[playerClientNum].ps.persistant[PERS_RANK] == 0
&& player->client->ps.persistant[PERS_KILLED] == 0) ? 1 : 0; && player->client->ps.persistant[PERS_KILLED] == 0) ? 1 : 0;
//Blaze: Removed because it uses the persistant stats stuff //Blaze: Removed because it uses the persistant stats stuff
/* Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy, Com_sprintf( msg, sizeof(msg), "postgame %i %i %i %i %i %i %i %i", level.numNonSpectatorClients, playerClientNum, accuracy,
player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT], player->client->ps.persistant[PERS_IMPRESSIVE_COUNT], player->client->ps.persistant[PERS_EXCELLENT_COUNT],
player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE], player->client->ps.persistant[PERS_GAUNTLET_FRAG_COUNT], player->client->ps.persistant[PERS_SCORE],
perfect );*/ perfect );
} } */
msglen = strlen(msg); msglen = strlen(msg);
for (i = 0; i < level.numNonSpectatorClients; i++) { for (i = 0; i < level.numNonSpectatorClients; i++) {

View file

@ -1214,7 +1214,6 @@ int G_SendCheatVars(int clientNum)
char *text_p; char *text_p;
int len; int len;
int i; int i;
int skip;
char *token; char *token;
char text[20000]; char text[20000];
fileHandle_t f; fileHandle_t f;
@ -1242,7 +1241,6 @@ int G_SendCheatVars(int clientNum)
// parse the text // parse the text
text_p = text; text_p = text;
skip = 0; // quite the compiler warning
for (i = 0; i < 30; i++) { for (i = 0; i < 30; i++) {
token = COM_Parse(&text_p); token = COM_Parse(&text_p);

View file

@ -418,7 +418,7 @@ Toss the weapon and powerups for the killed player
void TossClientItems(gentity_t * self) void TossClientItems(gentity_t * self)
{ {
gitem_t *item, *dropitem; gitem_t *item, *dropitem;
int weapon, i; int i;
float angle; float angle;
gentity_t *drop; gentity_t *drop;
@ -426,7 +426,7 @@ void TossClientItems(gentity_t * self)
int weaponInventory; int weaponInventory;
// drop the weapon if not a gauntlet or machinegun // drop the weapon if not a gauntlet or machinegun
weapon = self->s.weapon; //weapon = self->s.weapon;
//Slicer: don't drop weapons with all weapons enable.. //Slicer: don't drop weapons with all weapons enable..
if(g_RQ3_allWeapons.integer) if(g_RQ3_allWeapons.integer)

View file

@ -299,8 +299,9 @@ int Pickup_Ammo(gentity_t * ent, gentity_t * other, int bandolierFactor)
int Pickup_Weapon(gentity_t * ent, gentity_t * other, int bandolierFactor) int Pickup_Weapon(gentity_t * ent, gentity_t * other, int bandolierFactor)
{ {
int quantity, ammotoadd; int ammotoadd;
/* JBravo: Not used
if (ent->count < 0) { if (ent->count < 0) {
quantity = 0; // None for you, sir! quantity = 0; // None for you, sir!
} else { } else {
@ -309,7 +310,7 @@ int Pickup_Weapon(gentity_t * ent, gentity_t * other, int bandolierFactor)
} else { } else {
quantity = ent->item->quantity; quantity = ent->item->quantity;
} }
} } */
// add the weapon if not knife or pistol // add the weapon if not knife or pistol
if (ent->item->giTag != WP_KNIFE || ent->item->giTag != WP_PISTOL) { if (ent->item->giTag != WP_KNIFE || ent->item->giTag != WP_PISTOL) {

View file

@ -977,12 +977,11 @@ Fires at either the target or the current direction.
void func_breakable_explode(gentity_t * self, vec3_t pos) void func_breakable_explode(gentity_t * self, vec3_t pos)
{ {
int eParam; int eParam;
gentity_t *tent;
// GibEntity( self, 0 ); // GibEntity( self, 0 );
eParam = self->s.eventParm; eParam = self->s.eventParm;
tent = G_TempEntity2(pos, EV_EXPLODE_BREAKABLE, eParam); G_TempEntity2(pos, EV_EXPLODE_BREAKABLE, eParam);
// self->takedamage = qfalse; // self->takedamage = qfalse;
// self->s.eType = ET_INVISIBLE; // self->s.eType = ET_INVISIBLE;
@ -1291,7 +1290,6 @@ Original by inolen, heavy modifications by Elder
*/ */
void G_BreakGlass(gentity_t * ent, gentity_t * inflictor, gentity_t * attacker, vec3_t point, int mod, int damage) void G_BreakGlass(gentity_t * ent, gentity_t * inflictor, gentity_t * attacker, vec3_t point, int mod, int damage)
{ {
gentity_t *tent;
vec3_t size; vec3_t size;
vec3_t impactPoint; vec3_t impactPoint;
@ -1362,13 +1360,13 @@ void G_BreakGlass(gentity_t * ent, gentity_t * inflictor, gentity_t * attacker,
//G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount); //G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
switch (shiftCount) { switch (shiftCount) {
case 0: case 0:
tent = G_TempEntity2(impactPoint, EV_BREAK_GLASS1, eParm); G_TempEntity2(impactPoint, EV_BREAK_GLASS1, eParm);
break; break;
case 1: case 1:
tent = G_TempEntity2(impactPoint, EV_BREAK_GLASS2, eParm); G_TempEntity2(impactPoint, EV_BREAK_GLASS2, eParm);
break; break;
case 2: case 2:
tent = G_TempEntity2(impactPoint, EV_BREAK_GLASS3, eParm); G_TempEntity2(impactPoint, EV_BREAK_GLASS3, eParm);
break; break;
default: default:
G_Error("G_BreakGlass: shiftCount > 2\n"); G_Error("G_BreakGlass: shiftCount > 2\n");
@ -1427,7 +1425,7 @@ void G_BreakGlass(gentity_t * ent, gentity_t * inflictor, gentity_t * attacker,
} }
//G_FreeEntity( ent ); //G_FreeEntity( ent );
//G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount); //G_Printf("%s shift: %i\n", vtos(impactPoint), shiftCount);
tent = G_TempEntity2(impactPoint, EV_CHIP_GLASS, eParm); G_TempEntity2(impactPoint, EV_CHIP_GLASS, eParm);
} }
} }