mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Eliminate the is_server global.
More ugliness gone :)
This commit is contained in:
parent
8d853589e3
commit
db8eee502f
10 changed files with 9 additions and 15 deletions
|
@ -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.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -68,8 +68,6 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
#include "compat.h"
|
||||
#include "host.h"
|
||||
|
||||
qboolean is_server = false;
|
||||
|
||||
int noconinput;
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -61,7 +61,6 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
#include "netchan.h"
|
||||
|
||||
int noconinput = 0;
|
||||
qboolean is_server = false;
|
||||
|
||||
static void
|
||||
shutdown (void)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -59,7 +59,6 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
# include <libc.h>
|
||||
#endif
|
||||
|
||||
qboolean is_server = true;
|
||||
server_static_t svs;
|
||||
|
||||
#ifdef __alpha__
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue