Fix warnings.

This commit is contained in:
Marcus Sundberg 2000-01-08 17:37:36 +00:00
parent f2d4e5f06a
commit 754215066b
2 changed files with 12 additions and 8 deletions

View file

@ -340,7 +340,9 @@ void PF_sprint (void)
char *s; char *s;
client_t *client; client_t *client;
int entnum; int entnum;
#ifdef QUAKEWORLD
int level; int level;
#endif
entnum = G_EDICTNUM(OFS_PARM0); entnum = G_EDICTNUM(OFS_PARM0);
@ -1517,9 +1519,7 @@ MESSAGE WRITING
sizebuf_t *WriteDest (void) sizebuf_t *WriteDest (void)
{ {
int entnum; int dest;
int dest;
edict_t *ent;
dest = G_FLOAT(OFS_PARM0); dest = G_FLOAT(OFS_PARM0);
switch (dest) switch (dest)
@ -1527,17 +1527,21 @@ sizebuf_t *WriteDest (void)
case MSG_BROADCAST: case MSG_BROADCAST:
return &sv.datagram; return &sv.datagram;
case MSG_ONE: case MSG_ONE: {
#ifdef QUAKEWORLD #ifdef QUAKEWORLD
SV_Error("Shouldn't be at MSG_ONE"); SV_Error("Shouldn't be at MSG_ONE");
return &svs.clients[entnum-1].netchan.message; break;
#else #else
int entnum;
edict_t *ent;
ent = PROG_TO_EDICT(pr_global_struct->msg_entity); ent = PROG_TO_EDICT(pr_global_struct->msg_entity);
entnum = NUM_FOR_EDICT(ent); entnum = NUM_FOR_EDICT(ent);
if (entnum < 1 || entnum > svs.maxclients) if (entnum < 1 || entnum > svs.maxclients)
PR_RunError ("WriteDest: not a client"); PR_RunError ("WriteDest: not a client");
return &svs.clients[entnum-1].message; return &svs.clients[entnum-1].message;
#endif #endif
}
case MSG_ALL: case MSG_ALL:
return &sv.reliable_datagram; return &sv.reliable_datagram;

View file

@ -333,9 +333,9 @@ A download message has been received from the server
*/ */
void CL_ParseDownload (void) void CL_ParseDownload (void)
{ {
int size, percent; int size, percent;
byte name[1024]; char name[1024];
int r; int r;
// read the data // read the data