mirror of
https://git.code.sf.net/p/quake/quakeforge-old
synced 2025-03-03 15:31:02 +00:00
Fixed bunch of unused variables.
This commit is contained in:
parent
e0bfb15dcf
commit
b86ca17101
4 changed files with 55 additions and 52 deletions
|
@ -124,13 +124,6 @@ const char *gl_renderer;
|
||||||
const char *gl_version;
|
const char *gl_version;
|
||||||
const char *gl_extensions;
|
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 is8bit = false;
|
||||||
qboolean isPermedia = false;
|
qboolean isPermedia = false;
|
||||||
qboolean gl_mtexable = false;
|
qboolean gl_mtexable = false;
|
||||||
|
@ -232,8 +225,6 @@ void VID_SetPalette (unsigned char *palette)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char s[255];
|
char s[255];
|
||||||
float dist, bestdist;
|
float dist, bestdist;
|
||||||
static qboolean palflag = false;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// 8 8 8 encoding
|
// 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.
|
// JACK: 3D distance calcs - k is last closest, l is the distance.
|
||||||
#ifdef QUAKEWORLD
|
#ifdef QUAKEWORLD
|
||||||
// FIXME: Precalculate this and cache to disk.
|
{
|
||||||
if (palflag)
|
static qboolean palflag = false;
|
||||||
return;
|
|
||||||
palflag = true;
|
// FIXME: Precalculate this and cache to disk.
|
||||||
|
if (palflag)
|
||||||
|
return;
|
||||||
|
palflag = true;
|
||||||
|
}
|
||||||
|
|
||||||
COM_FOpenFile("glquake/15to8.pal", &f);
|
COM_FOpenFile("glquake/15to8.pal", &f);
|
||||||
if (f) {
|
if (f) {
|
||||||
fread(d_15to8table, 1<<15, 1, f);
|
fread(d_15to8table, 1<<15, 1, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
} else {
|
} else
|
||||||
#else // QUAKEWORLD
|
|
||||||
{
|
|
||||||
#endif // QUAKEWORLD
|
#endif // QUAKEWORLD
|
||||||
|
{
|
||||||
for (i=0; i < (1<<15); i++) {
|
for (i=0; i < (1<<15); i++) {
|
||||||
/* Maps
|
/* Maps
|
||||||
000000000000000
|
000000000000000
|
||||||
|
|
|
@ -308,10 +308,10 @@ bprint(value)
|
||||||
*/
|
*/
|
||||||
void PF_bprint (void)
|
void PF_bprint (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
int level;
|
|
||||||
|
|
||||||
#ifdef QUAKEWORLD
|
#ifdef QUAKEWORLD
|
||||||
|
int level;
|
||||||
|
|
||||||
level = G_FLOAT(OFS_PARM0);
|
level = G_FLOAT(OFS_PARM0);
|
||||||
|
|
||||||
s = PF_VarString(1);
|
s = PF_VarString(1);
|
||||||
|
@ -336,8 +336,8 @@ void PF_sprint (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
client_t *client;
|
client_t *client;
|
||||||
int entnum;
|
int entnum;
|
||||||
int level;
|
int level;
|
||||||
|
|
||||||
entnum = G_EDICTNUM(OFS_PARM0);
|
entnum = G_EDICTNUM(OFS_PARM0);
|
||||||
|
|
||||||
|
@ -382,7 +382,7 @@ centerprint(clientent, value)
|
||||||
void PF_centerprint (void)
|
void PF_centerprint (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
int entnum;
|
int entnum;
|
||||||
client_t *cl;
|
client_t *cl;
|
||||||
|
|
||||||
entnum = G_EDICTNUM(OFS_PARM0);
|
entnum = G_EDICTNUM(OFS_PARM0);
|
||||||
|
@ -1370,11 +1370,10 @@ void PF_aim (void)
|
||||||
{
|
{
|
||||||
edict_t *ent, *check, *bestent;
|
edict_t *ent, *check, *bestent;
|
||||||
vec3_t start, dir, end, bestdir;
|
vec3_t start, dir, end, bestdir;
|
||||||
int i, j;
|
int i, j;
|
||||||
trace_t tr;
|
trace_t tr;
|
||||||
float dist, bestdist;
|
float dist, bestdist;
|
||||||
float speed;
|
float speed;
|
||||||
char *noaim;
|
|
||||||
|
|
||||||
ent = G_EDICT(OFS_PARM0);
|
ent = G_EDICT(OFS_PARM0);
|
||||||
speed = G_FLOAT(OFS_PARM1);
|
speed = G_FLOAT(OFS_PARM1);
|
||||||
|
@ -1387,6 +1386,8 @@ void PF_aim (void)
|
||||||
i = NUM_FOR_EDICT(ent);
|
i = NUM_FOR_EDICT(ent);
|
||||||
if (i>0 && i<MAX_CLIENTS)
|
if (i>0 && i<MAX_CLIENTS)
|
||||||
{
|
{
|
||||||
|
char *noaim;
|
||||||
|
|
||||||
noaim = Info_ValueForKey (svs.clients[i-1].userinfo, "noaim");
|
noaim = Info_ValueForKey (svs.clients[i-1].userinfo, "noaim");
|
||||||
if (atoi(noaim) > 0)
|
if (atoi(noaim) > 0)
|
||||||
{
|
{
|
||||||
|
@ -1733,10 +1734,10 @@ PF_changelevel
|
||||||
void PF_changelevel (void)
|
void PF_changelevel (void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
#ifdef QUAKEWORLD
|
||||||
static int last_spawncount;
|
static int last_spawncount;
|
||||||
|
|
||||||
// make sure we don't issue two changelevels
|
// make sure we don't issue two changelevels
|
||||||
#ifdef QUAKEWORLD
|
|
||||||
if (svs.spawncount == last_spawncount)
|
if (svs.spawncount == last_spawncount)
|
||||||
return;
|
return;
|
||||||
last_spawncount = svs.spawncount;
|
last_spawncount = svs.spawncount;
|
||||||
|
|
|
@ -1065,9 +1065,7 @@ PR_LoadProgs
|
||||||
*/
|
*/
|
||||||
void PR_LoadProgs (void)
|
void PR_LoadProgs (void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char num[32];
|
|
||||||
dfunction_t *f;
|
|
||||||
|
|
||||||
// flush the non-C variable lookup cache
|
// flush the non-C variable lookup cache
|
||||||
for (i=0 ; i<GEFV_CACHESIZE ; i++)
|
for (i=0 ; i<GEFV_CACHESIZE ; i++)
|
||||||
|
@ -1091,9 +1089,15 @@ void PR_LoadProgs (void)
|
||||||
Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
|
Con_DPrintf ("Programs occupy %iK.\n", com_filesize/1024);
|
||||||
|
|
||||||
#ifdef QUAKEWORLD
|
#ifdef QUAKEWORLD
|
||||||
// add prog crc to the serverinfo
|
{
|
||||||
snprintf(num, sizeof(num), "%i", CRC_Block ((byte *)progs, com_filesize));
|
char num[32];
|
||||||
Info_SetValueForStarKey (svs.info, "*progs", num, MAX_SERVERINFO_STRING);
|
|
||||||
|
// 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
|
#else
|
||||||
for (i=0 ; i<com_filesize ; i++)
|
for (i=0 ; i<com_filesize ; i++)
|
||||||
CRC_ProcessByte (&pr_crc, ((byte *)progs)[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]);
|
((int *)pr_globals)[i] = LittleLong (((int *)pr_globals)[i]);
|
||||||
|
|
||||||
#ifdef QUAKEWORLD
|
#ifdef QUAKEWORLD
|
||||||
// Zoid, find the spectator functions
|
{
|
||||||
SpectatorConnect = SpectatorThink = SpectatorDisconnect = 0;
|
dfunction_t *f;
|
||||||
|
|
||||||
if ((f = ED_FindFunction ("SpectatorConnect")) != NULL)
|
// Zoid, find the spectator functions
|
||||||
SpectatorConnect = (func_t)(f - pr_functions);
|
SpectatorConnect = SpectatorThink = SpectatorDisconnect = 0;
|
||||||
if ((f = ED_FindFunction ("SpectatorThink")) != NULL)
|
|
||||||
SpectatorThink = (func_t)(f - pr_functions);
|
if ((f = ED_FindFunction ("SpectatorConnect")) != NULL)
|
||||||
if ((f = ED_FindFunction ("SpectatorDisconnect")) != NULL)
|
SpectatorConnect = (func_t)(f - pr_functions);
|
||||||
SpectatorDisconnect = (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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -329,13 +329,10 @@ int bitcounts[16];
|
||||||
|
|
||||||
void CL_ParseUpdate (int bits)
|
void CL_ParseUpdate (int bits)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
model_t *model;
|
model_t *model;
|
||||||
int modnum;
|
|
||||||
qboolean forcelink;
|
qboolean forcelink;
|
||||||
entity_t *ent;
|
entity_t *ent;
|
||||||
int num;
|
int modnum, num, i;
|
||||||
int skin;
|
|
||||||
|
|
||||||
if (cls.signon == SIGNONS - 1)
|
if (cls.signon == SIGNONS - 1)
|
||||||
{ // first update is the final signon stage
|
{ // first update is the final signon stage
|
||||||
|
@ -416,16 +413,19 @@ if (bits&(1<<i))
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef GLQUAKE
|
#ifdef GLQUAKE
|
||||||
if (bits & U_SKIN)
|
{
|
||||||
skin = MSG_ReadByte();
|
int skin;
|
||||||
else
|
|
||||||
skin = ent->baseline.skin;
|
|
||||||
if (skin != ent->skinnum) {
|
|
||||||
ent->skinnum = skin;
|
|
||||||
if (num > 0 && num <= cl.maxclients)
|
|
||||||
R_TranslatePlayerSkin (num - 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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
|
#else
|
||||||
|
|
||||||
if (bits & U_SKIN)
|
if (bits & U_SKIN)
|
||||||
|
|
Loading…
Reference in a new issue