Fixed warnings
This commit is contained in:
parent
e108022ae5
commit
6bda9a9fe0
15 changed files with 58 additions and 55 deletions
30
cl_main.c
30
cl_main.c
|
@ -422,7 +422,7 @@ float CL_LerpPoint (void)
|
|||
if (f > 0.1)
|
||||
{ // dropped packet, or start of demo
|
||||
cl.mtime[1] = cl.mtime[0] - 0.1;
|
||||
f = 0.1;
|
||||
f = 0.1f;
|
||||
}
|
||||
frac = (cl.time - cl.mtime[1]) / f;
|
||||
//Con_Printf ("frac: %f\n",frac);
|
||||
|
@ -572,7 +572,7 @@ void CL_RelinkEntities (void)
|
|||
dl->radius = 200 + (rand()&31);
|
||||
dl->minlight = 32;
|
||||
dl->die = cl.time + 0.1;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9; dl->color[2] = 0.7;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9f; dl->color[2] = 0.7f;
|
||||
dl->owner = ent;
|
||||
}
|
||||
if (ent->effects & EF_BRIGHTLIGHT)
|
||||
|
@ -616,8 +616,8 @@ void CL_RelinkEntities (void)
|
|||
dl->radius = 200 + (rand()&31);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->color[0] = 1;
|
||||
dl->color[1] = 0.2;
|
||||
dl->color[2] = 0.2;
|
||||
dl->color[1] = 0.2f;
|
||||
dl->color[2] = 0.2f;
|
||||
dl->owner = ent;
|
||||
}
|
||||
if (ent->effects & EF_GREEN)
|
||||
|
@ -626,9 +626,9 @@ void CL_RelinkEntities (void)
|
|||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200 + (rand()&31);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->color[0] = 0.2;
|
||||
dl->color[0] = 0.2f;
|
||||
dl->color[1] = 1;
|
||||
dl->color[2] = 0.2;
|
||||
dl->color[2] = 0.2f;
|
||||
dl->owner = ent;
|
||||
}
|
||||
if (ent->effects & EF_FULLDYNAMIC)
|
||||
|
@ -673,8 +673,8 @@ void CL_RelinkEntities (void)
|
|||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200 + (rand()&31);
|
||||
dl->die = cl.time + 0.001;
|
||||
dl->color[0] = 0.9;
|
||||
dl->color[1] = 0.2;
|
||||
dl->color[0] = 0.9f;
|
||||
dl->color[1] = 0.2f;
|
||||
dl->color[2] = 1;
|
||||
dl->owner = ent;
|
||||
}
|
||||
|
@ -717,7 +717,7 @@ void CL_RelinkEntities (void)
|
|||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200;
|
||||
dl->die = cl.time + 0.01;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9; dl->color[2] = 0.7;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9f; dl->color[2] = 0.7f;
|
||||
dl->owner = ent;
|
||||
//PENTA: Hack give the lava ball a lava cube map
|
||||
if (!strcmp (ent->model->name, "progs/lavaball.mdl")) {
|
||||
|
@ -735,7 +735,7 @@ void CL_RelinkEntities (void)
|
|||
VectorCopy (ent->origin, dl->origin);
|
||||
dl->radius = 200;
|
||||
dl->die = cl.time + 0.01;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9; dl->color[2] = 0.7;
|
||||
dl->color[0] = 1; dl->color[1] = 0.9f; dl->color[2] = 0.7f;
|
||||
dl->owner = ent;
|
||||
}
|
||||
else if (ent->model->flags & EF_TRACER3)
|
||||
|
@ -773,18 +773,20 @@ int CL_ReadFromServer (void)
|
|||
|
||||
cl.oldtime = cl.time;
|
||||
cl.time += host_frametime;
|
||||
|
||||
do
|
||||
|
||||
do
|
||||
{
|
||||
ret = CL_GetMessage ();
|
||||
if (ret == -1)
|
||||
|
||||
if (ret == -1)
|
||||
Host_Error ("CL_ReadFromServer: lost server connection");
|
||||
if (!ret)
|
||||
break;
|
||||
|
||||
cl.last_received_message = realtime;
|
||||
CL_ParseServerMessage ();
|
||||
} while (ret && cls.state == ca_connected);
|
||||
|
||||
} while (ret && cls.state == ca_connected);
|
||||
|
||||
if (cl_shownet.value)
|
||||
Con_Printf ("\n");
|
||||
|
|
|
@ -242,8 +242,8 @@ void R_InterpolateNormals(aliashdr_t *paliashdr, aliasframeinstant_t *instant, i
|
|||
|
||||
lat = ( verts1[i].lightnormalindex >> 8 ) & 0xff;
|
||||
lng = ( verts1[i].lightnormalindex & 0xff );
|
||||
lat *= M_PI/128;
|
||||
lng *= M_PI/128;
|
||||
lat *= M_PI_F/128.0f;
|
||||
lng *= M_PI_F/128.0f;
|
||||
|
||||
norm1[0] = cos(lat) * sin(lng);
|
||||
norm1[1] = sin(lat) * sin(lng);
|
||||
|
@ -251,8 +251,8 @@ void R_InterpolateNormals(aliashdr_t *paliashdr, aliasframeinstant_t *instant, i
|
|||
|
||||
lat = ( verts2[i].lightnormalindex >> 8 ) & 0xff;
|
||||
lng = ( verts2[i].lightnormalindex & 0xff );
|
||||
lat *= M_PI/128;
|
||||
lng *= M_PI/128;
|
||||
lat *= M_PI_F/128.0f;
|
||||
lng *= M_PI_F/128.0f;
|
||||
|
||||
norm2[0] = cos(lat) * sin(lng);
|
||||
norm2[1] = sin(lat) * sin(lng);
|
||||
|
@ -386,7 +386,7 @@ void R_SetupLerpPoses(aliashdr_t *paliashdr,entity_t *e) {
|
|||
jumps will be less noticable because of the shorter time. So,
|
||||
this is probably a good assumption.
|
||||
*/
|
||||
e->frame_interval = 0.1;
|
||||
e->frame_interval = 0.1f;
|
||||
}
|
||||
|
||||
if (e->pose2 != pose) {
|
||||
|
|
|
@ -35,10 +35,10 @@ NOTE: This should not draw sprites, sprites are drawn separately.
|
|||
bumpdriver_t gl_bumpdriver;
|
||||
|
||||
/* Some material definitions. */
|
||||
float gl_Light_Ambience2[4] = {0.03,0.03,0.03,0.03};
|
||||
float gl_Light_Diffuse2[4] = {0.03,0.03,0.03,0.03};
|
||||
float gl_Light_Ambience2[4] = {0.03f,0.03f,0.03f,0.03f};
|
||||
float gl_Light_Diffuse2[4] = {0.03f,0.03f,0.03f,0.03f};
|
||||
float gl_Light_Specular2[4] = {0,0,0,0};
|
||||
float gl_Material_Color2[4] = {0.9, 0.9, 0.9, 0.9};
|
||||
float gl_Material_Color2[4] = {0.9f, 0.9f, 0.9f, 0.9f};
|
||||
|
||||
void R_DrawLightEntitiesGF3 (shadowlight_t *l);
|
||||
void R_DrawLightEntitiesGF (shadowlight_t *l);
|
||||
|
|
12
gl_curves.c
12
gl_curves.c
|
@ -641,14 +641,14 @@ void SetupMeshBox(mesh_t *m) {
|
|||
|
||||
int i;
|
||||
|
||||
m->mins[0] = 10e10;
|
||||
m->mins[1] = 10e10;
|
||||
m->mins[2] = 10e10;
|
||||
m->mins[0] = 10e10f;
|
||||
m->mins[1] = 10e10f;
|
||||
m->mins[2] = 10e10f;
|
||||
|
||||
|
||||
m->maxs[0] = -10e10;
|
||||
m->maxs[1] = -10e10;
|
||||
m->maxs[2] = -10e10;
|
||||
m->maxs[0] = -10e10f;
|
||||
m->maxs[1] = -10e10f;
|
||||
m->maxs[2] = -10e10f;
|
||||
|
||||
for (i=0; i<m->numvertices; i++) {
|
||||
VectorMax(m->maxs, tempVertices[m->firstvertex+i].position ,m->maxs);
|
||||
|
|
|
@ -288,7 +288,7 @@ qboolean DecalAddPolygon(decal_t *dec, int vertcount, vec3_t *vertices)
|
|||
return true;
|
||||
}
|
||||
|
||||
const float decalEpsilon = 0.001;
|
||||
const float decalEpsilon = 0.001f;
|
||||
|
||||
void DecalClipLeaf(decal_t *dec, mleaf_t *leaf)
|
||||
{
|
||||
|
@ -568,7 +568,7 @@ void R_DrawDecals (void)
|
|||
glDepthMask(1);
|
||||
glDisable (GL_BLEND);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER,0.666);
|
||||
glAlphaFunc(GL_GREATER,0.666f);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
glFogfv(GL_FOG_COLOR, fog_color);
|
||||
}
|
||||
|
|
10
gl_glare.c
10
gl_glare.c
|
@ -243,13 +243,13 @@ void GlareQuad() {
|
|||
|
||||
glBegin (GL_QUADS);
|
||||
glTexCoord2f(-1,1);
|
||||
glVertex3f (0.1, 1, 1);
|
||||
glVertex3f (0.1f, 1, 1);
|
||||
glTexCoord2f(0,1);
|
||||
glVertex3f (0.1, -1, 1);
|
||||
glVertex3f (0.1f, -1, 1);
|
||||
glTexCoord2f(0,0);
|
||||
glVertex3f (0.1, -1, -1);
|
||||
glVertex3f (0.1f, -1, -1);
|
||||
glTexCoord2f(-1,0);
|
||||
glVertex3f (0.1, 1, -1);
|
||||
glVertex3f (0.1f, 1, -1);
|
||||
glEnd ();
|
||||
|
||||
}
|
||||
|
@ -278,7 +278,7 @@ glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
|||
glLoadIdentity ();
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
|
||||
glColor4f (0.2,0.2,0.2,0.2);
|
||||
glColor4f (0.2f,0.2f,0.2f,0.2f);
|
||||
|
||||
glPushMatrix();
|
||||
glTranslatef(0,0,GLARE_OFS);
|
||||
|
|
4
gl_md3.c
4
gl_md3.c
|
@ -258,8 +258,8 @@ void DecodeNormal(int quant, vec3_t norm) {
|
|||
|
||||
float lat = ( quant >> 8 ) & 0xff;
|
||||
float lng = ( quant & 0xff );
|
||||
lat *= M_PI/128;
|
||||
lng *= M_PI/128;
|
||||
lat *= M_PI_F/128;
|
||||
lng *= M_PI_F/128;
|
||||
|
||||
norm[0] = cos(lat) * sin(lng);
|
||||
norm[1] = sin(lat) * sin(lng);
|
||||
|
|
|
@ -160,7 +160,6 @@ Put the vertexes in the global vertex table.
|
|||
void ModQ3_LoadVertexes (lump_t *l)
|
||||
{
|
||||
dq3vertex_t *in;
|
||||
mvertex_t *out;
|
||||
int i, count;
|
||||
vec3_t pos;
|
||||
float tex[2], lightmap[2];
|
||||
|
@ -180,7 +179,7 @@ void ModQ3_LoadVertexes (lump_t *l)
|
|||
loadmodel->numvertexes = count;
|
||||
*/
|
||||
|
||||
for ( i=0 ; i<count ; i++, in++, out++)
|
||||
for ( i=0 ; i<count ; i++, in++)
|
||||
{
|
||||
pos[0] = LittleFloat (in->point[0]);
|
||||
pos[1] = LittleFloat (in->point[1]);
|
||||
|
|
|
@ -544,8 +544,8 @@ void R_DrawCaustics(void) {
|
|||
int i;
|
||||
vec3_t mins, maxs;
|
||||
|
||||
GLfloat sPlane[4] = {0.01, 0.005, 0.0, 0.0 };
|
||||
GLfloat tPlane[4] = {0.0, 0.01, 0.005, 0.0 };
|
||||
GLfloat sPlane[4] = {0.01f, 0.005f, 0.0f, 0.0f };
|
||||
GLfloat tPlane[4] = {0.0f, 0.01f, 0.005f, 0.0f };
|
||||
|
||||
if (!gl_caustics.value) return;
|
||||
|
||||
|
|
11
gl_shadow.c
11
gl_shadow.c
|
@ -208,7 +208,7 @@ void R_ShadowFromEntity(entity_t *ent) {
|
|||
|
||||
shadowlight_t *l;
|
||||
|
||||
l = AllocShadowLight();
|
||||
l = AllocShadowLight();
|
||||
if (!l) return;
|
||||
|
||||
VectorCopy(ent->origin,l->origin);
|
||||
|
@ -264,7 +264,8 @@ void R_ShadowFromEntity(entity_t *ent) {
|
|||
} else {
|
||||
l->halo = false;
|
||||
}
|
||||
BoxForRadius(l);
|
||||
|
||||
BoxForRadius(l);
|
||||
}
|
||||
|
||||
int cut_ent;
|
||||
|
@ -632,8 +633,8 @@ qboolean CheckSurfInLight(msurface_t *surf, shadowlight_t *light)
|
|||
//Doesn't intersect light volume
|
||||
if (light->isStatic)
|
||||
{
|
||||
vec3_t mins = {10e10,10e10,10e10};
|
||||
vec3_t maxs = {-10e10,-10e10,-10e10};
|
||||
vec3_t mins = {10e10f,10e10f,10e10f};
|
||||
vec3_t maxs = {-10e10f,-10e10f,-10e10f};
|
||||
int i;
|
||||
for (i=0; i<poly->numindecies; i++) {
|
||||
VectorMax(maxs,globalVertexTable[poly->indecies[i]].position,maxs);
|
||||
|
@ -2446,7 +2447,7 @@ void R_StaticLightFromEnt(entity_t *ent) {
|
|||
msurface_t *s;
|
||||
mapshader_t *t;
|
||||
|
||||
//Con_Printf("Shadow volumes start\n");
|
||||
//Con_Printf("Shadow volumes start\n");
|
||||
|
||||
if (!ent->model) {
|
||||
Con_Printf("Light with null model");
|
||||
|
|
|
@ -1276,7 +1276,7 @@ static void Check_Gamma (unsigned char *pal)
|
|||
(gl_vendor && strstr(gl_vendor, "3Dfx")))
|
||||
vid_gamma = 1;
|
||||
else
|
||||
vid_gamma = 0.6; // default to 0.7 on non-3dfx hardware
|
||||
vid_gamma = 0.6f; // default to 0.7 on non-3dfx hardware
|
||||
//PENTA: lowered to make things a little brighter
|
||||
} else
|
||||
vid_gamma = Q_atof(com_argv[i+1]);
|
||||
|
|
|
@ -33,6 +33,7 @@ typedef float matrix_1x4[4]; // a 1x4 matrix or a row vector
|
|||
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||
#define M_PI_F 3.14159265358979323846f // matches value in gcc v2 math.h
|
||||
#endif
|
||||
|
||||
struct mplane_s;
|
||||
|
|
10
r_part.c
10
r_part.c
|
@ -478,8 +478,8 @@ extern float r_avertexnormals[NUMVERTEXNORMALS][3];
|
|||
vec3_t avelocities[NUMVERTEXNORMALS];
|
||||
float beamlength = 16;
|
||||
vec3_t avelocity = {23, 7, 3};
|
||||
float partstep = 0.01;
|
||||
float timescale = 0.01;
|
||||
float partstep = 0.01f;
|
||||
float timescale = 0.01f;
|
||||
|
||||
void R_EntityParticles (entity_t *ent)
|
||||
{
|
||||
|
@ -1246,7 +1246,7 @@ void R_DrawParticles (void)
|
|||
glEnable (GL_BLEND);
|
||||
glBlendFunc (GL_ONE, GL_ONE);
|
||||
glEnable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER,0.01);
|
||||
glAlphaFunc(GL_GREATER,0.01f);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
glDepthMask(0);
|
||||
|
||||
|
@ -1418,7 +1418,7 @@ void R_DrawParticles (void)
|
|||
//calc reflection vector
|
||||
d = DotProduct (p->vel, trace.plane.normal);
|
||||
VectorMA (p->vel, -2*d, trace.plane.normal, p->vel);
|
||||
VectorScale(p->vel,0.33,p->vel);
|
||||
VectorScale(p->vel,0.33f,p->vel);
|
||||
VectorCopy(trace.endpos,p->org);
|
||||
//XYZ
|
||||
p->numbounces--;
|
||||
|
@ -1448,7 +1448,7 @@ void R_DrawParticles (void)
|
|||
glDepthMask(1);
|
||||
glDisable (GL_BLEND);
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
glAlphaFunc(GL_GREATER,0.666);
|
||||
glAlphaFunc(GL_GREATER,0.666f);
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
//XYZ
|
||||
glLoadIdentity();
|
||||
|
|
|
@ -331,7 +331,7 @@ int SV_FlyMove (edict_t *ent, float time, trace_t *steptrace)
|
|||
/*Changing the last parameter from 1.0 to 1.01 seems to solve most of the collision
|
||||
problems. I don't really know why it works but I got the idea from quake2 where it was
|
||||
also changed to 1.01*/
|
||||
ClipVelocity (original_velocity, planes[i], new_velocity, 1.01);
|
||||
ClipVelocity (original_velocity, planes[i], new_velocity, 1.01f);
|
||||
for (j=0 ; j<numplanes ; j++)
|
||||
if (j != i)
|
||||
{
|
||||
|
@ -1037,7 +1037,7 @@ int SV_TryUnstick (edict_t *ent, vec3_t oldvel)
|
|||
ent->v.velocity[0] = oldvel[0];
|
||||
ent->v. velocity[1] = oldvel[1];
|
||||
ent->v. velocity[2] = 0;
|
||||
clip = SV_FlyMove (ent, 0.1, &steptrace);
|
||||
clip = SV_FlyMove (ent, 0.1f, &steptrace);
|
||||
|
||||
if ( fabs(oldorg[1] - ent->v.origin[1]) > 4
|
||||
|| fabs(oldorg[0] - ent->v.origin[0]) > 4 )
|
||||
|
|
|
@ -269,7 +269,7 @@ void SV_WaterMove (void)
|
|||
VectorScale (wishvel, sv_maxspeed.value/wishspeed, wishvel);
|
||||
wishspeed = sv_maxspeed.value;
|
||||
}
|
||||
wishspeed *= 0.7;
|
||||
wishspeed *= 0.7f;
|
||||
|
||||
//
|
||||
// water friction
|
||||
|
|
Loading…
Reference in a new issue