Eliminate the is_server global.

More ugliness gone :)
This commit is contained in:
Bill Currie 2011-09-03 14:26:11 +09:00
parent 8d853589e3
commit db8eee502f
10 changed files with 9 additions and 15 deletions

View file

@ -67,15 +67,15 @@ extern struct cvar_s *qport;
int Net_Log_Init (const char **sound_precache);
void Net_LogPrintf (const char *fmt, ...) __attribute__ ((format (printf, 1, 2)));
void Log_Incoming_Packet (const byte *p, int len, int has_sequence);
void Log_Outgoing_Packet (const byte *p, int len, int has_sequence);
void Log_Incoming_Packet (const byte *p, int len, int has_sequence,
int is_server);
void Log_Outgoing_Packet (const byte *p, int len, int has_sequence,
int is_server);
void Net_LogStop (void);
void Analyze_Client_Packet (const byte * data, int len, int has_sequence);
void Analyze_Server_Packet (const byte * data, int len, int has_sequence);
extern struct cvar_s *net_packetlog;
extern qboolean is_server;
//@}
/** \defgroup qw-udp QuakeWorld udp support.

View file

@ -396,7 +396,7 @@ CL_GetMessage (void)
if (net_packetlog->int_val)
Log_Incoming_Packet (net_message->message->data,
net_message->message->cursize, 1);
net_message->message->cursize, 1, 0);
if (cls.demorecording)

View file

@ -1025,7 +1025,7 @@ CL_ReadPackets (void)
if (cls.demoplayback && net_packetlog->int_val)
Log_Incoming_Packet (net_message->message->data,
net_message->message->cursize, 0);
net_message->message->cursize, 0, 0);
// remote command packet
if (*(int *) net_message->message->data == -1) {

View file

@ -68,8 +68,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h"
#include "host.h"
qboolean is_server = false;
int noconinput;
#ifdef _WIN32

View file

@ -61,7 +61,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "netchan.h"
int noconinput = 0;
qboolean is_server = false;
static void
shutdown (void)

View file

@ -64,7 +64,6 @@ static __attribute__ ((used)) const char rcsid[] =
#define NOT_FOCUS_SLEEP 20 // sleep time when not focus
qboolean ActiveApp, Minimized, WinNT;
qboolean is_server = false;
HWND hwnd_dialog; // startup dialog box

View file

@ -226,7 +226,7 @@ ascii_dump_buf (unsigned char *buf, int len)
}
*/
void
Log_Incoming_Packet (const byte *p, int len, int has_sequence)
Log_Incoming_Packet (const byte *p, int len, int has_sequence, int is_server)
{
if (!net_loglevel->int_val)
return;
@ -250,7 +250,7 @@ Log_Incoming_Packet (const byte *p, int len, int has_sequence)
}
void
Log_Outgoing_Packet (const byte *p, int len, int has_sequence)
Log_Outgoing_Packet (const byte *p, int len, int has_sequence, int is_server)
{
if (!net_loglevel->int_val)
return;

View file

@ -1762,7 +1762,7 @@ SV_ReadPackets (void)
while (NET_GetPacket ()) {
if (net_packetlog->int_val)
Log_Incoming_Packet (net_message->message->data,
net_message->message->cursize, 1);
net_message->message->cursize, 1, 1);
if (SV_FilterIP (net_from.ip, &until)) {
SV_SendBan (until); // tell them we aren't listening...
continue;

View file

@ -59,7 +59,6 @@ static __attribute__ ((used)) const char rcsid[] =
# include <libc.h>
#endif
qboolean is_server = true;
server_static_t svs;
#ifdef __alpha__

View file

@ -43,7 +43,6 @@ static __attribute__ ((used)) const char rcsid[] =
#include "compat.h"
#include "server.h"
qboolean is_server = true;
qboolean WinNT;
server_static_t svs;