Fixed bunch of unused variables.

This commit is contained in:
Marcus Sundberg 2000-01-06 00:29:41 +00:00
parent e0bfb15dcf
commit b86ca17101
4 changed files with 55 additions and 52 deletions

View file

@ -124,13 +124,6 @@ const char *gl_renderer;
const char *gl_version;
const char *gl_extensions;
#ifndef QUAKEWORLD
void (*qgl3DfxSetPaletteEXT) (GLuint *);
void (*qglColorTableEXT) (int, int, int, int, int, const void *);
static float vid_gamma = 1.0;
#endif // !QUAKEWORLD
qboolean is8bit = false;
qboolean isPermedia = false;
qboolean gl_mtexable = false;
@ -232,8 +225,6 @@ void VID_SetPalette (unsigned char *palette)
FILE *f;
char s[255];
float dist, bestdist;
static qboolean palflag = false;
//
// 8 8 8 encoding
//
@ -257,19 +248,22 @@ void VID_SetPalette (unsigned char *palette)
// JACK: 3D distance calcs - k is last closest, l is the distance.
#ifdef QUAKEWORLD
// FIXME: Precalculate this and cache to disk.
if (palflag)
return;
palflag = true;
{
static qboolean palflag = false;
// FIXME: Precalculate this and cache to disk.
if (palflag)
return;
palflag = true;
}
COM_FOpenFile("glquake/15to8.pal", &f);
if (f) {
fread(d_15to8table, 1<<15, 1, f);
fclose(f);
} else {
#else // QUAKEWORLD
{
} else
#endif // QUAKEWORLD
{
for (i=0; i < (1<<15); i++) {
/* Maps
000000000000000

View file

@ -308,10 +308,10 @@ bprint(value)
*/
void PF_bprint (void)
{
char *s;
int level;
char *s;
#ifdef QUAKEWORLD
int level;
level = G_FLOAT(OFS_PARM0);
s = PF_VarString(1);
@ -336,8 +336,8 @@ void PF_sprint (void)
{
char *s;
client_t *client;
int entnum;
int level;
int entnum;
int level;
entnum = G_EDICTNUM(OFS_PARM0);
@ -382,7 +382,7 @@ centerprint(clientent, value)
void PF_centerprint (void)
{
char *s;
int entnum;
int entnum;
client_t *cl;
entnum = G_EDICTNUM(OFS_PARM0);
@ -1370,11 +1370,10 @@ void PF_aim (void)
{
edict_t *ent, *check, *bestent;
vec3_t start, dir, end, bestdir;
int i, j;
int i, j;
trace_t tr;
float dist, bestdist;
float speed;
char *noaim;
ent = G_EDICT(OFS_PARM0);
speed = G_FLOAT(OFS_PARM1);
@ -1387,6 +1386,8 @@ void PF_aim (void)
i = NUM_FOR_EDICT(ent);
if (i>0 && i<MAX_CLIENTS)
{
char *noaim;
noaim = Info_ValueForKey (svs.clients[i-1].userinfo, "noaim");
if (atoi(noaim) > 0)
{
@ -1733,10 +1734,10 @@ PF_changelevel
void PF_changelevel (void)
{
char *s;
#ifdef QUAKEWORLD
static int last_spawncount;
// make sure we don't issue two changelevels
#ifdef QUAKEWORLD
if (svs.spawncount == last_spawncount)
return;
last_spawncount = svs.spawncount;

View file

@ -1065,9 +1065,7 @@ PR_LoadProgs
*/
void PR_LoadProgs (void)
{
int i;
char num[32];
dfunction_t *f;
int i;
// flush the non-C variable lookup cache
for (i=0 ; i<GEFV_CACHESIZE ; i++)
@ -1091,9 +1089,15 @@ void PR_LoadProgs (void)
Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
#ifdef QUAKEWORLD
// add prog crc to the serverinfo
snprintf(num, sizeof(num), "%i", CRC_Block ((byte *)progs, com_filesize));
Info_SetValueForStarKey (svs.info, "*progs", num, MAX_SERVERINFO_STRING);
{
char num[32];
// add prog crc to the serverinfo
snprintf(num, sizeof(num), "%i", CRC_Block ((byte *)progs,
com_filesize));
Info_SetValueForStarKey(svs.info, "*progs", num,
MAX_SERVERINFO_STRING);
}
#else
for (i=0 ; i<com_filesize ; i++)
CRC_ProcessByte (&pr_crc, ((byte *)progs)[i]);
@ -1174,15 +1178,19 @@ void PR_LoadProgs (void)
((int *)pr_globals)[i] = LittleLong (((int *)pr_globals)[i]);
#ifdef QUAKEWORLD
// Zoid, find the spectator functions
SpectatorConnect = SpectatorThink = SpectatorDisconnect = 0;
{
dfunction_t *f;
if ((f = ED_FindFunction ("SpectatorConnect")) != NULL)
SpectatorConnect = (func_t)(f - pr_functions);
if ((f = ED_FindFunction ("SpectatorThink")) != NULL)
SpectatorThink = (func_t)(f - pr_functions);
if ((f = ED_FindFunction ("SpectatorDisconnect")) != NULL)
SpectatorDisconnect = (func_t)(f - pr_functions);
// Zoid, find the spectator functions
SpectatorConnect = SpectatorThink = SpectatorDisconnect = 0;
if ((f = ED_FindFunction ("SpectatorConnect")) != NULL)
SpectatorConnect = (func_t)(f - pr_functions);
if ((f = ED_FindFunction ("SpectatorThink")) != NULL)
SpectatorThink = (func_t)(f - pr_functions);
if ((f = ED_FindFunction ("SpectatorDisconnect")) != NULL)
SpectatorDisconnect = (func_t)(f - pr_functions);
}
#endif
}

View file

@ -329,13 +329,10 @@ int bitcounts[16];
void CL_ParseUpdate (int bits)
{
int i;
model_t *model;
int modnum;
qboolean forcelink;
entity_t *ent;
int num;
int skin;
int modnum, num, i;
if (cls.signon == SIGNONS - 1)
{ // first update is the final signon stage
@ -416,16 +413,19 @@ if (bits&(1<<i))
}
#ifdef GLQUAKE
if (bits & U_SKIN)
skin = MSG_ReadByte();
else
skin = ent->baseline.skin;
if (skin != ent->skinnum) {
ent->skinnum = skin;
if (num > 0 && num <= cl.maxclients)
R_TranslatePlayerSkin (num - 1);
}
{
int skin;
if (bits & U_SKIN)
skin = MSG_ReadByte();
else
skin = ent->baseline.skin;
if (skin != ent->skinnum) {
ent->skinnum = skin;
if (num > 0 && num <= cl.maxclients)
R_TranslatePlayerSkin (num - 1);
}
}
#else
if (bits & U_SKIN)