Fix some annoying stuff.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5300 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2018-08-24 00:35:16 +00:00
parent b73979fa84
commit be373b88b9
8 changed files with 42 additions and 14 deletions

View File

@ -4,6 +4,8 @@
#Public builds are still built using the (overcomplicated) traditional (g)makefile. #Public builds are still built using the (overcomplicated) traditional (g)makefile.
CMAKE_MINIMUM_REQUIRED(VERSION 3.0) CMAKE_MINIMUM_REQUIRED(VERSION 3.0)
cmake_policy(SET CMP0063 NEW)
PROJECT(fteqw) PROJECT(fteqw)
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
@ -75,6 +77,7 @@ ELSE()
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11) SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_X11)
ENDIF() ENDIF()
SET(OpenGL_GL_PREFERENCE LEGACY)
FIND_PACKAGE(OpenGL) FIND_PACKAGE(OpenGL)
IF(NOT OpenGL_FOUND) IF(NOT OpenGL_FOUND)
MESSAGE(WARNING "opengl library NOT available. Will depend upon vulkan.") MESSAGE(WARNING "opengl library NOT available. Will depend upon vulkan.")
@ -581,7 +584,7 @@ IF (${BULLET_FOUND})
ENDIF() ENDIF()
#ODE Physics library plugin #ODE Physics library plugin
FIND_PACKAGE(ode) #FIND_PACKAGE(ode)
IF (${ODE_FOUND}) IF (${ODE_FOUND})
ADD_LIBRARY(ode MODULE ADD_LIBRARY(ode MODULE
plugins/qvm_api.c plugins/qvm_api.c

View File

@ -1620,8 +1620,8 @@ BASELDFLAGS:=-L$(ARCHLIBS) $(BASELDFLAGS)
.default: help .default: help
all: rel all: rel
rel: sv-rel gl-rel mingl-rel rel: sv-rel m-rel mingl-rel qcc-rel
dbg: sv-dbg gl-dbg mingl-dbg dbg: sv-dbg m-dbg mingl-dbg qcc-dbg
relcl: glcl-rel mcl-rel relcl: glcl-rel mcl-rel
profile: sv-profile gl-profile mingl-profile profile: sv-profile gl-profile mingl-profile

View File

@ -2667,7 +2667,7 @@ static void FS_AddDataFiles(searchpath_t **oldpaths, const char *purepath, const
} }
} }
PM_LoadPackages(oldpaths, purepath, logicalpaths, search, loadstuff, 1000, 0x7fffffff); PM_LoadPackages(oldpaths, purepath, logicalpaths, search, loadstuff, 1000, 0x7ffffffe);
} }
static searchpath_t *FS_AddPathHandle(searchpath_t **oldpaths, const char *purepath, const char *logicalpath, searchpathfuncs_t *handle, const char *prefix, unsigned int flags, unsigned int loadstuff) static searchpath_t *FS_AddPathHandle(searchpath_t **oldpaths, const char *purepath, const char *logicalpath, searchpathfuncs_t *handle, const char *prefix, unsigned int flags, unsigned int loadstuff)
@ -3056,7 +3056,7 @@ void COM_Gamedir (const char *dir, const struct gamepacks *packagespaths)
#endif #endif
/*quake requires a few settings for compatibility*/ /*quake requires a few settings for compatibility*/
#define EZQUAKECOMPETITIVE "set ruleset_allow_fbmodels 1\n" #define EZQUAKECOMPETITIVE "set ruleset_allow_fbmodels 1\nset sv_demoExtensions \"\"\n"
#define QRPCOMPAT "set cl_cursor_scale 0.2\nset cl_cursor_bias_x 7.5\nset cl_cursor_bias_y 0.8" #define QRPCOMPAT "set cl_cursor_scale 0.2\nset cl_cursor_bias_x 7.5\nset cl_cursor_bias_y 0.8"
#define QCFG "set com_parseutf8 0\nset allow_download_refpackages 0\nset sv_bigcoords \"\"\nmap_autoopenportals 1\n" "sv_port "STRINGIFY(PORT_QWSERVER)" "STRINGIFY(PORT_NQSERVER)"\n" ZFIXHACK EZQUAKECOMPETITIVE QRPCOMPAT #define QCFG "set com_parseutf8 0\nset allow_download_refpackages 0\nset sv_bigcoords \"\"\nmap_autoopenportals 1\n" "sv_port "STRINGIFY(PORT_QWSERVER)" "STRINGIFY(PORT_NQSERVER)"\n" ZFIXHACK EZQUAKECOMPETITIVE QRPCOMPAT
//nehahra has to be weird with extra cvars, and buggy fullbrights. //nehahra has to be weird with extra cvars, and buggy fullbrights.

View File

@ -97,7 +97,9 @@ typedef int (VARGS gnutls_certificate_verify_function)(gnutls_session_t session)
#else #else
#include <gnutls/gnutls.h> #include <gnutls/gnutls.h>
#if GNUTLS_VERSION_MAJOR >= 3
#include <gnutls/abstract.h> #include <gnutls/abstract.h>
#endif
#include <gnutls/x509.h> #include <gnutls/x509.h>
#if GNUTLS_VERSION_MAJOR >= 3 && defined(HAVE_DTLS) #if GNUTLS_VERSION_MAJOR >= 3 && defined(HAVE_DTLS)
#include <gnutls/dtls.h> #include <gnutls/dtls.h>
@ -130,6 +132,7 @@ typedef int (VARGS gnutls_certificate_verify_function)(gnutls_session_t session)
#endif #endif
#endif #endif
#if GNUTLS_VERSION_MAJOR >= 3
#if GNUTLS_VERSION_MAJOR >= 3 #if GNUTLS_VERSION_MAJOR >= 3
#define GNUTLS_HAVE_SYSTEMTRUST #define GNUTLS_HAVE_SYSTEMTRUST
#endif #endif
@ -1329,5 +1332,14 @@ const dtlsfuncs_t *GNUDTLS_InitClient(void)
} }
#endif #endif
#else
#warning "GNUTLS version is too old (3.0+ required). Please clean and then recompile with CFLAGS=-DNO_GNUTLS"
qboolean SSL_InitGlobal(qboolean isserver) {return false;}
vfsfile_t *FS_OpenSSL(const char *hostname, vfsfile_t *source, qboolean isserver) {return NULL;}
int TLS_GetChannelBinding(vfsfile_t *vf, qbyte *binddata, size_t *bindsize) {return -1;}
const dtlsfuncs_t *GNUDTLS_InitClient(void) {return NULL;}
const dtlsfuncs_t *GNUDTLS_InitServer(void) {return NULL;}
#endif
#endif #endif

View File

@ -2983,6 +2983,7 @@ neterr_t FTENET_Datagram_SendPacket(ftenet_generic_connection_t *con, int length
ret = sendto (con->thesocket, data, length, 0, (struct sockaddr*)&addr, size ); ret = sendto (con->thesocket, data, length, 0, (struct sockaddr*)&addr, size );
if (ret == -1) if (ret == -1)
{ {
const char *prot;
int ecode = neterrno(); int ecode = neterrno();
// wouldblock is silent // wouldblock is silent
if (ecode == NET_EWOULDBLOCK) if (ecode == NET_EWOULDBLOCK)
@ -3000,15 +3001,25 @@ neterr_t FTENET_Datagram_SendPacket(ftenet_generic_connection_t *con, int length
return NETERR_DISCONNECTED; return NETERR_DISCONNECTED;
} }
//network is unreachable scares the socks off people when IPv6 is non-functional despite ipv4 working fine.
//name the problem protocol in the error message.
switch(to->type)
{
case NA_IP: prot = "IPv4"; break;
case NA_IPV6: prot = "IPv6"; break;
case NA_IPX: prot = "IPX"; break;
default: prot = ""; break;
}
#ifndef SERVERONLY #ifndef SERVERONLY
if (ecode == NET_EADDRNOTAVAIL) if (ecode == NET_EADDRNOTAVAIL)
Con_DPrintf("NET_SendPacket Warning: %i\n", ecode); Con_DPrintf("NET_Send%sPacket Warning: %i\n", prot, ecode);
else else
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
Con_TPrintf ("NET_SendPacket ERROR: %i\n", ecode); Con_TPrintf ("NET_Send%sPacket ERROR: %i\n", prot, ecode);
#else #else
Con_TPrintf ("NET_SendPacket ERROR: %s\n", strerror(ecode)); Con_TPrintf ("NET_Send%sPacket ERROR: %s\n", prot, strerror(ecode));
#endif #endif
} }
else if (ret < length) else if (ret < length)

View File

@ -1862,6 +1862,7 @@ static void SV_Status_f (void)
int columns = 80; int columns = 80;
extern cvar_t sv_listen_qw; extern cvar_t sv_listen_qw;
extern cvar_t net_enable_tls, net_enable_http, net_enable_webrtcbroker, net_enable_websockets, net_enable_qizmo, net_enable_qtv;
#ifdef NQPROT #ifdef NQPROT
extern cvar_t sv_listen_nq, sv_listen_dp; extern cvar_t sv_listen_nq, sv_listen_dp;
#endif #endif
@ -1935,7 +1936,7 @@ static void SV_Status_f (void)
else if (net_enable_dtls.ival) else if (net_enable_dtls.ival)
Con_Printf(" DTLS"); Con_Printf(" DTLS");
#endif #endif
/*if (net_enable_tls.ival) if (net_enable_tls.ival)
Con_Printf(" TLS"); Con_Printf(" TLS");
if (net_enable_http.ival) if (net_enable_http.ival)
Con_Printf(" HTTP"); Con_Printf(" HTTP");
@ -1946,7 +1947,7 @@ static void SV_Status_f (void)
if (net_enable_qizmo.ival) if (net_enable_qizmo.ival)
Con_Printf(" QZ"); Con_Printf(" QZ");
if (net_enable_qtv.ival) if (net_enable_qtv.ival)
Con_Printf(" QTV");*/ Con_Printf(" QTV");
Con_Printf("\n"); Con_Printf("\n");
break; break;
} }

View File

@ -41,7 +41,7 @@ cvar_t sv_demofps = CVAR("sv_demofps", "30");
cvar_t sv_demoPings = CVARD("sv_demoPings", "10", "Interval between ping updates in mvds"); cvar_t sv_demoPings = CVARD("sv_demoPings", "10", "Interval between ping updates in mvds");
cvar_t sv_demoMaxSize = CVARD("sv_demoMaxSize", "", "Demos will be truncated to be no larger than this size."); cvar_t sv_demoMaxSize = CVARD("sv_demoMaxSize", "", "Demos will be truncated to be no larger than this size.");
cvar_t sv_demoExtraNames = CVAR("sv_demoExtraNames", ""); cvar_t sv_demoExtraNames = CVAR("sv_demoExtraNames", "");
cvar_t sv_demoExtensions = CVARD("sv_demoExtensions", "", "Enables protocol extensions within MVDs. This will cause older/non-fte clients to error upon playback.\n0: off.\n1: all extensions.\n2: extensions also supported by a certain other engine."); cvar_t sv_demoExtensions = CVARD("sv_demoExtensions", "1", "Enables protocol extensions within MVDs. This will cause older/non-fte clients to error upon playback.\n0: off.\n1: all extensions.\n2: extensions also supported by a certain other engine.");
cvar_t sv_demoAutoCompress = CVARD("sv_demoAutoCompress", "", "Specifies whether to compress demos as they're recorded.\n0 = no compression.\n1 = gzip compression."); cvar_t sv_demoAutoCompress = CVARD("sv_demoAutoCompress", "", "Specifies whether to compress demos as they're recorded.\n0 = no compression.\n1 = gzip compression.");
cvar_t sv_demo_write_csqc = CVARD("sv_demo_write_csqc", "", "Writes a copy of the csprogs into recorded demos. This ensures that the demo can be played back despite future gamecode changes."); cvar_t sv_demo_write_csqc = CVARD("sv_demo_write_csqc", "", "Writes a copy of the csprogs into recorded demos. This ensures that the demo can be played back despite future gamecode changes.");
@ -1577,7 +1577,7 @@ qboolean SV_MVD_Record (mvddest_t *dest)
demo.datagram.prim = demo.recorder.netchan.netprim; demo.datagram.prim = demo.recorder.netchan.netprim;
if (sv_demoExtensions.ival == 2 || !*sv_demoExtensions.string) if (sv_demoExtensions.ival == 2 || !*sv_demoExtensions.string)
{ /*more limited subset supported by ezquake*/ { /*more limited subset supported by ezquake, but not fuhquake/fodquake. sorry.*/
demo.recorder.fteprotocolextensions = /*PEXT_CHUNKEDDOWNLOADS|*/PEXT_256PACKETENTITIES|/*PEXT_FLOATCOORDS|*/PEXT_MODELDBL|PEXT_ENTITYDBL|PEXT_ENTITYDBL2|PEXT_SPAWNSTATIC2; demo.recorder.fteprotocolextensions = /*PEXT_CHUNKEDDOWNLOADS|*/PEXT_256PACKETENTITIES|/*PEXT_FLOATCOORDS|*/PEXT_MODELDBL|PEXT_ENTITYDBL|PEXT_ENTITYDBL2|PEXT_SPAWNSTATIC2;
// demo.recorder.fteprotocolextensions |= PEXT_HLBSP; /*ezquake DOES have this, but it is pointless and should have been in some feature mask rather than protocol extensions*/ // demo.recorder.fteprotocolextensions |= PEXT_HLBSP; /*ezquake DOES have this, but it is pointless and should have been in some feature mask rather than protocol extensions*/
// demo.recorder.fteprotocolextensions |= PEXT_ACCURATETIMINGS; /*ezquake does not support this any more*/ // demo.recorder.fteprotocolextensions |= PEXT_ACCURATETIMINGS; /*ezquake does not support this any more*/

View File

@ -3665,7 +3665,8 @@ void SV_SendClientMessages (void)
} }
c->lastoutgoingphysicstime = sv.world.physicstime; c->lastoutgoingphysicstime = sv.world.physicstime;
} }
if (sv.mvdrecording)
SV_ProcessSendFlags(&demo.recorder);
SV_CleanupEnts(); SV_CleanupEnts();
} }