warning fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6248 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2011-04-14 15:24:11 +00:00
parent 67392bd0fc
commit a4b83ef2ba
7 changed files with 8 additions and 17 deletions
-3
View File
@@ -296,7 +296,6 @@ void audiomanager::updateplayerfootsteps(playerent *p)
if(!p) return;
const int footstepradius = 20;
static float lastoffset = 0;
// find existing footstep sounds
physentreference ref(p);
@@ -319,8 +318,6 @@ void audiomanager::updateplayerfootsteps(playerent *p)
location *l = locs[i];
if(!l) continue;
if(l->playmillis+minplaytime>totalmillis) continue; // tolerate short interruptions by enforcing a minimal playtime
lastoffset = l->offset(); // save last offset
DEBUGVAR(lastoffset);
l->drop();
}
}
+1 -2
View File
@@ -102,7 +102,7 @@ entity *CACBot::SearchForEnts(bool bUseWPs, float flRange, float flMaxHeight)
- distance
*/
float flNearestDist = 9999, flDist;
float flDist;
entity *pNewTargetEnt = NULL;
waypoint_s *pWptNearBot = NULL, *pBestWpt = NULL;
short sScore, sHighestScore = 0;
@@ -216,7 +216,6 @@ entity *CACBot::SearchForEnts(bool bUseWPs, float flRange, float flMaxHeight)
pBestWpt = NULL; // Best ent so far doesn't need any waypoints
sHighestScore = sScore;
flNearestDist = flDist;
pNewTargetEnt = &ents[i];
}
}
+2 -2
View File
@@ -709,8 +709,8 @@ void setkillmessage(int gun, bool gib, const char *message)
return;
}
if(gib) formatstring(gibmessages[gun])("%s", message);
else formatstring(fragmessages[gun])("%s", message);
if(gib) copystring(gibmessages[gun], message, sizeof(gibmessages[gun]));
else copystring(fragmessages[gun], message, sizeof(fragmessages[gun]));
}
void fragmessage(const char *gun, const char *message)
+3 -3
View File
@@ -118,7 +118,7 @@ void parsepositions(ucharbuf &p)
int cn, f, g;
vec o, vel;
float yaw, pitch, roll = 0;
bool scoping, shoot;
bool scoping;//, shoot;
if(type == SV_POSC)
{
bitbuf<ucharbuf> q(p);
@@ -146,7 +146,7 @@ void parsepositions(ucharbuf &p)
if(negz) z = -z;
o.z = z / DMF;
scoping = ( q.getbits(1) ? true : false );
shoot = ( q.getbits(1) ? true : false );
q.getbits(1);//shoot = ( q.getbits(1) ? true : false );
}
else
{
@@ -162,7 +162,7 @@ void parsepositions(ucharbuf &p)
if ((g>>1) & 1) vel.y = getint(p)/DVELF; else vel.y = 0;
if ((g>>2) & 1) vel.z = getint(p)/DVELF; else vel.z = 0;
scoping = ( (g>>4) & 1 ? true : false );
shoot = ( (g>>5) & 1 ? true : false ); // we are not using this yet
//shoot = ( (g>>5) & 1 ? true : false ); // we are not using this yet
f = getuint(p);
}
int seqcolor = (f>>6)&1;
+1 -2
View File
@@ -617,11 +617,10 @@ struct medalsst {bool assigned; int cn; int item;};
#define MAXKILLMSGLEN 16
extern char fragmessages[NUMGUNS][MAXKILLMSGLEN];
extern char gibmessages[NUMGUNS][MAXKILLMSGLEN];
inline const char *killmessage(int gun, bool gib = false)
{
if(gun<0 || gun>=NUMGUNS) return "";
if(gib) return gibmessages[gun];
else return fragmessages[gun];
}
}
+1 -3
View File
@@ -34,7 +34,7 @@ inline void checkclientpos(client *cl)
int getmaxarea(int inversed_x, int inversed_y, int transposed, int ml_factor, char *ml)
{
int ls = (1 << ml_factor);
int xi = 0, oxi = 0, xf = 0, oxf = 0, yi = 0, yf = 0, fx = 0, fy = 0;
int xi = 0, oxi = 0, xf = 0, oxf = 0, fx = 0, fy = 0;
int area = 0, maxarea = 0;
bool sav_x = false, sav_y = false;
@@ -65,7 +65,6 @@ int getmaxarea(int inversed_x, int inversed_y, int transposed, int ml_factor, ch
if ( sav_y ) { // if the last line was saved
if ( 2*oxi + MINELINE < 2*xf &&
2*xi + MINELINE < 2*oxf ) { // if the last line intersect this one
yf = y; // new end of area
area += xf - xi;
} else {
oxi = xi; // new area vertices
@@ -75,7 +74,6 @@ int getmaxarea(int inversed_x, int inversed_y, int transposed, int ml_factor, ch
else {
oxi = xi;
oxf = xf;
yi = y; // new begin of area
sav_y = true; // accumulating lines from now
}
} else {
-2
View File
@@ -157,11 +157,9 @@ void createrays(vec &from, vec &to) // create random spread of rays for the shot
spoke.orthogonal(dir);
spoke.normalize();
spoke.mul(f);
int circseg = -1;
loopk(3)
loopi(SGRAYS)
{
circseg = k;
int j = k * SGRAYS;
sgr[j+i].ds = k==0 ? SGSEGDMG_O : (k==1? SGSEGDMG_M: SGSEGDMG_C);
vec p(spoke);