mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 07:11:41 +00:00
oops :) (packet log fixes: segs aren't nice)
This commit is contained in:
parent
ced128e572
commit
d2a4faae6e
7 changed files with 19 additions and 30 deletions
|
@ -136,4 +136,6 @@ extern void Log_Incoming_Packet (char *p, int len);
|
|||
extern void Log_Outgoing_Packet (char *p, int len);
|
||||
extern void Net_LogStop (void);
|
||||
|
||||
extern struct cvar_s *net_packetlog;
|
||||
|
||||
#endif // _NET_H
|
||||
|
|
|
@ -63,7 +63,6 @@
|
|||
|
||||
#include "QF/cdaudio.h"
|
||||
#include "QF/cmd.h"
|
||||
#include "compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "QF/cvar.h"
|
||||
#include "QF/draw.h"
|
||||
|
@ -82,6 +81,7 @@
|
|||
#include "QF/va.h"
|
||||
#include "QF/vfs.h"
|
||||
|
||||
#include "compat.h"
|
||||
#include "bothdefs.h"
|
||||
#include "buildnum.h"
|
||||
#include "cl_cam.h"
|
||||
|
@ -1032,9 +1032,8 @@ CL_ReadPackets (void)
|
|||
// while (NET_GetPacket ())
|
||||
while (CL_GetMessage ()) {
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
if (cls.demoplayback) Log_Incoming_Packet(net_message->message->data,net_message->message->cursize);
|
||||
#endif
|
||||
if (cls.demoplayback && net_packetlog->int_val)
|
||||
Log_Incoming_Packet(net_message->message->data,net_message->message->cursize);
|
||||
|
||||
// remote command packet
|
||||
if (*(int *) net_message->message->data == -1) {
|
||||
|
@ -1633,7 +1632,6 @@ Host_Init (void)
|
|||
|
||||
NET_Init (cl_port->int_val);
|
||||
Netchan_Init ();
|
||||
#ifdef PACKET_LOGGING
|
||||
{
|
||||
static char *sound_precache[MAX_MODELS];
|
||||
int i;
|
||||
|
@ -1642,7 +1640,6 @@ Host_Init (void)
|
|||
sound_precache[i] = cl.sound_name[i];
|
||||
Net_Log_Init (sound_precache);
|
||||
}
|
||||
#endif
|
||||
|
||||
W_LoadWadFile ("gfx.wad");
|
||||
Key_Init ();
|
||||
|
|
|
@ -45,18 +45,16 @@
|
|||
#include <sys/mman.h>
|
||||
|
||||
#include "QF/cvar.h"
|
||||
#include "host.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "QF/sys.h"
|
||||
|
||||
#include "host.h"
|
||||
#include "net.h"
|
||||
|
||||
int noconinput = 0;
|
||||
qboolean is_server = false;
|
||||
char *svs_info;
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
void Net_LogStop (void);
|
||||
#endif
|
||||
|
||||
// General routines ======================================================
|
||||
|
||||
|
||||
|
@ -66,9 +64,7 @@ Sys_Quit (void)
|
|||
Host_Shutdown ();
|
||||
fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NONBLOCK);
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
Net_LogStop();
|
||||
#endif
|
||||
Net_LogStop();
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
|
|
@ -38,17 +38,19 @@
|
|||
#include <conio.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "client.h"
|
||||
#include "compat.h"
|
||||
#include "QF/console.h"
|
||||
#include "host.h"
|
||||
#include "QF/qargs.h"
|
||||
#include "resource.h"
|
||||
#include "QF/screen.h"
|
||||
#include "QF/sound.h"
|
||||
#include "QF/sys.h"
|
||||
#include "QF/vid.h"
|
||||
|
||||
#include "client.h"
|
||||
#include "compat.h"
|
||||
#include "host.h"
|
||||
#include "net.h"
|
||||
#include "resource.h"
|
||||
|
||||
qboolean is_server = false;
|
||||
char *svs_info;
|
||||
|
||||
|
@ -229,9 +231,7 @@ Sys_Quit (void)
|
|||
if (qwclsemaphore)
|
||||
CloseHandle (qwclsemaphore);
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
Net_LogStop();
|
||||
#endif
|
||||
Net_LogStop();
|
||||
|
||||
exit (0);
|
||||
}
|
||||
|
|
|
@ -1891,9 +1891,7 @@ SV_InitNet (void)
|
|||
|
||||
Netchan_Init ();
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
Net_Log_Init(sv.sound_precache);
|
||||
#endif
|
||||
Net_Log_Init(sv.sound_precache);
|
||||
|
||||
// heartbeats will always be sent to the id master
|
||||
svs.last_heartbeat = -99999; // send immediately
|
||||
|
|
|
@ -92,9 +92,7 @@ void
|
|||
Sys_Quit (void)
|
||||
{
|
||||
|
||||
#ifdef PACKET_LOGGING
|
||||
Net_LogStop();
|
||||
#endif
|
||||
Net_LogStop();
|
||||
|
||||
exit (0); // appkit isn't running
|
||||
}
|
||||
|
|
|
@ -116,9 +116,7 @@ Sys_ConsoleInput (void)
|
|||
void
|
||||
Sys_Quit (void)
|
||||
{
|
||||
#ifdef PACKET_LOGGING
|
||||
Net_LogStop();
|
||||
#endif
|
||||
Net_LogStop();
|
||||
exit (0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue