diff --git a/include/netchan.h b/include/netchan.h index 52b591ee5..0226c9d46 100644 --- a/include/netchan.h +++ b/include/netchan.h @@ -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. diff --git a/qw/source/cl_demo.c b/qw/source/cl_demo.c index 1c9c00f4d..f45b6ac27 100644 --- a/qw/source/cl_demo.c +++ b/qw/source/cl_demo.c @@ -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) diff --git a/qw/source/cl_main.c b/qw/source/cl_main.c index aba395fc5..f4d945e73 100644 --- a/qw/source/cl_main.c +++ b/qw/source/cl_main.c @@ -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) { diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index 0d3361405..912803538 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -68,8 +68,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "compat.h" #include "host.h" -qboolean is_server = false; - int noconinput; #ifdef _WIN32 diff --git a/qw/source/cl_sys_unix.c b/qw/source/cl_sys_unix.c index 492cd547e..d5fdb3623 100644 --- a/qw/source/cl_sys_unix.c +++ b/qw/source/cl_sys_unix.c @@ -61,7 +61,6 @@ static __attribute__ ((used)) const char rcsid[] = #include "netchan.h" int noconinput = 0; -qboolean is_server = false; static void shutdown (void) diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index d33ba050f..d1502e5df 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -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 diff --git a/qw/source/net_packetlog.c b/qw/source/net_packetlog.c index 1aa679900..e70f61263 100644 --- a/qw/source/net_packetlog.c +++ b/qw/source/net_packetlog.c @@ -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; diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index 24ecfab57..fb1a77db9 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -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; diff --git a/qw/source/sv_sys_unix.c b/qw/source/sv_sys_unix.c index 4ec7c8f66..2f2d5ff3b 100644 --- a/qw/source/sv_sys_unix.c +++ b/qw/source/sv_sys_unix.c @@ -59,7 +59,6 @@ static __attribute__ ((used)) const char rcsid[] = # include #endif -qboolean is_server = true; server_static_t svs; #ifdef __alpha__ diff --git a/qw/source/sv_sys_win.c b/qw/source/sv_sys_win.c index c3e234cae..787bb891c 100644 --- a/qw/source/sv_sys_win.c +++ b/qw/source/sv_sys_win.c @@ -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;