A few warnings from Travis. Including an out of bound access
This commit is contained in:
@@ -2141,6 +2141,8 @@ int AAS_Reachability_Jump(int area1num, int area2num)
|
|||||||
if (area2->mins[2] > area1->maxs[2] + maxjumpheight) return qfalse;
|
if (area2->mins[2] > area1->maxs[2] + maxjumpheight) return qfalse;
|
||||||
//
|
//
|
||||||
bestdist = 999999;
|
bestdist = 999999;
|
||||||
|
memset(&beststart2, 0, sizeof(beststart2));
|
||||||
|
memset(&bestend2,0,sizeof(bestend2));
|
||||||
//
|
//
|
||||||
for (i = 0; i < area1->numfaces; i++)
|
for (i = 0; i < area1->numfaces; i++)
|
||||||
{
|
{
|
||||||
@@ -3163,6 +3165,8 @@ aas_lreachability_t *AAS_FindFaceReachabilities(vec3_t *facepoints, int numpoint
|
|||||||
lreachabilities = NULL;
|
lreachabilities = NULL;
|
||||||
bestfacenum = 0;
|
bestfacenum = 0;
|
||||||
bestfaceplane = NULL;
|
bestfaceplane = NULL;
|
||||||
|
memset(&beststart2, 0, sizeof(beststart2));
|
||||||
|
memset(&bestend2, 0 , sizeof(bestend2));
|
||||||
//
|
//
|
||||||
for (i = 1; i < aasworld.numareas; i++)
|
for (i = 1; i < aasworld.numareas; i++)
|
||||||
{
|
{
|
||||||
|
@@ -1401,17 +1401,16 @@ void RB_CalcAtlasTexCoords( const atlas_t *at, float *st )
|
|||||||
int frametotal = w * h;
|
int frametotal = w * h;
|
||||||
float alha = ((0.25+backEnd.currentEntity->e.shaderRGBA[3]) / (tr.identityLight * 256.0f));
|
float alha = ((0.25+backEnd.currentEntity->e.shaderRGBA[3]) / (tr.identityLight * 256.0f));
|
||||||
int framethere = frametotal - ((frametotal * alha));
|
int framethere = frametotal - ((frametotal * alha));
|
||||||
int f;
|
framex = 0;
|
||||||
framex = 0;
|
for(int f=0; f<framethere; f++)
|
||||||
for(f=0; f<framethere; f++)
|
{
|
||||||
{
|
framex +=1;
|
||||||
framex +=1;
|
|
||||||
|
|
||||||
if (framex >= w){
|
if (framex >= w){
|
||||||
framey +=1; // next row!
|
framey +=1; // next row!
|
||||||
framex = 0; // reset column
|
framex = 0; // reset column
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else // static/animated
|
else // static/animated
|
||||||
@@ -1452,12 +1451,11 @@ void RB_CalcAtlasTexCoords( const atlas_t *at, float *st )
|
|||||||
|
|
||||||
tmi.matrix[0][0] = 1.0f / w;
|
tmi.matrix[0][0] = 1.0f / w;
|
||||||
tmi.matrix[1][0] = 0;
|
tmi.matrix[1][0] = 0;
|
||||||
tmi.matrix[2][0] = 0;
|
tmi.matrix[0][1] = 0;
|
||||||
tmi.translate[0] = ((1.0f / w) * framex);
|
tmi.translate[0] = ((1.0f / w) * framex);
|
||||||
|
|
||||||
tmi.matrix[0][1] = 0;
|
tmi.matrix[0][1] = 0;
|
||||||
tmi.matrix[1][1] = 1.0f / h;
|
tmi.matrix[1][1] = 1.0f / h;
|
||||||
tmi.matrix[2][1] = 0;
|
|
||||||
tmi.translate[1] = ((1.0f / h) * framey);
|
tmi.translate[1] = ((1.0f / h) * framey);
|
||||||
|
|
||||||
RB_CalcTransformTexCoords( &tmi, st );
|
RB_CalcTransformTexCoords( &tmi, st );
|
||||||
|
Reference in New Issue
Block a user