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