Build config tweaks.
Changed NOLEGACY to HAVE_LEGACY (the negation was annoying). Added missing defines to the alternative build configs, and removed some obsolete ones. Fixed a crash in svc_setportalstate. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5446 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
3ee3230f96
commit
9f46ea14ff
59 changed files with 497 additions and 280 deletions
|
@ -4078,7 +4078,7 @@ void CL_LinkPacketEntities (void)
|
|||
modelflags = model->flags;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (cl.model_precache_vwep[0] && state->modelindex2 < MAX_VWEP_MODELS)
|
||||
{
|
||||
if (state->modelindex == cl_playerindex && cl.model_precache_vwep[0]->loadstate == MLS_LOADED &&
|
||||
|
@ -5081,7 +5081,7 @@ void CL_LinkPlayers (void)
|
|||
static int flickertime;
|
||||
static int flicker;
|
||||
float predictmsmult = 1000*cl_predict_players_frac.value;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
int modelindex2;
|
||||
#endif
|
||||
extern cvar_t cl_demospeed;
|
||||
|
@ -5134,7 +5134,7 @@ void CL_LinkPlayers (void)
|
|||
continue;
|
||||
|
||||
//the extra modelindex check is to stop lame mods from using vweps with rings
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (state->command.impulse && cl.model_precache_vwep[0] && cl.model_precache_vwep[0]->type != mod_dummy && state->modelindex == cl_playerindex)
|
||||
{
|
||||
model = cl.model_precache_vwep[0];
|
||||
|
@ -5144,7 +5144,7 @@ void CL_LinkPlayers (void)
|
|||
#endif
|
||||
{
|
||||
model = cl.model_precache[state->modelindex];
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
modelindex2 = 0;
|
||||
#endif
|
||||
}
|
||||
|
@ -5336,7 +5336,7 @@ void CL_LinkPlayers (void)
|
|||
CL_AddFlagModels (ent, 0);
|
||||
else if (state->effects & QWEF_FLAG2)
|
||||
CL_AddFlagModels (ent, 1);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (modelindex2)
|
||||
CL_AddVWeapModel (ent, cl.model_precache_vwep[modelindex2]);
|
||||
#endif
|
||||
|
|
|
@ -3922,7 +3922,7 @@ qboolean CL_AllowArbitaryDownload(const char *oldname, const char *localfile)
|
|||
return false;
|
||||
}
|
||||
|
||||
#if defined(NQPROT) && !defined(NOLEGACY)
|
||||
#if defined(NQPROT) && defined(HAVE_LEGACY)
|
||||
//this is for DP compat.
|
||||
static void CL_Curl_f(void)
|
||||
{
|
||||
|
@ -4741,7 +4741,7 @@ void CL_Init (void)
|
|||
Cmd_AddCommand ("fullinfo", CL_FullInfo_f);
|
||||
|
||||
Cmd_AddCommand ("color", CL_Color_f);
|
||||
#if defined(NQPROT) && !defined(NOLEGACY)
|
||||
#if defined(NQPROT) && defined(HAVE_LEGACY)
|
||||
Cmd_AddCommand ("curl", CL_Curl_f);
|
||||
#endif
|
||||
Cmd_AddCommand ("download", CL_Download_f);
|
||||
|
@ -6180,7 +6180,7 @@ void CL_StartCinematicOrMenu(void)
|
|||
else if (idcin_depth != FDEPTH_MISSING)
|
||||
Media_PlayFilm("video/idlog.cin", true);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//and for fun (blame spirit):
|
||||
if (COM_FCheckExists("data/local/video/New_Bliz640x480.bik"))
|
||||
Media_PlayFilm("av:data/local/video/New_Bliz640x480.bik", true);
|
||||
|
|
|
@ -848,7 +848,7 @@ void CL_DownloadFinished(qdownload_t *dl)
|
|||
break;
|
||||
}
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
for (i = 0; i < MAX_VWEP_MODELS; i++)
|
||||
{
|
||||
if (!strcmp(cl.model_name_vwep[i], filename))
|
||||
|
@ -1186,7 +1186,7 @@ static void Model_CheckDownloads (void)
|
|||
CL_CheckModelResources(s);
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
for (i = 0; i < MAX_VWEP_MODELS; i++)
|
||||
{
|
||||
s = cl.model_name_vwep[i];
|
||||
|
@ -1339,7 +1339,7 @@ static int CL_LoadModels(int stage, qboolean dontactuallyload)
|
|||
endstage();
|
||||
}
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
for (i = 0; i < MAX_VWEP_MODELS; i++)
|
||||
{
|
||||
if (!cl.model_name_vwep[i][0])
|
||||
|
@ -3595,7 +3595,7 @@ static void CLNQ_ParseProtoVersion(void)
|
|||
cls.protocol_nq = CPNQ_ID;
|
||||
cls.z_ext = 0;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (protover == PROTOCOL_VERSION_NQ && cls.demoplayback)
|
||||
{
|
||||
if (!Q_strcasecmp(FS_GetGamedir(true), "nehahra"))
|
||||
|
@ -4188,7 +4188,7 @@ static void CL_ParseModellist (qboolean lots)
|
|||
cl_spikeindex = nummodels;
|
||||
if (!strcmp(cl.model_name[nummodels],"progs/player.mdl"))
|
||||
cl_playerindex = nummodels;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (*cl.model_name_vwep[0] && !strcmp(cl.model_name[nummodels],cl.model_name_vwep[0]) && cl_playerindex == -1)
|
||||
cl_playerindex = nummodels;
|
||||
#endif
|
||||
|
@ -6381,7 +6381,7 @@ static void CL_ParseStuffCmd(char *msg, int destsplit) //this protects stuffcmds
|
|||
cl.serverpakschanged = true;
|
||||
CL_CheckServerPacks();
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strncmp(stufftext, "//vwep ", 7)) //list of vwep model indexes, because using the normal model precaches wasn't cool enough
|
||||
{ //(from zquake/ezquake)
|
||||
int i;
|
||||
|
@ -6650,11 +6650,14 @@ static void CL_ParsePortalState(void)
|
|||
a1 = MSG_ReadShort();
|
||||
else
|
||||
a1 = MSG_ReadByte();
|
||||
if (cl.worldmodel && cl.worldmodel->loadstate==MLS_LOADED && cl.worldmodel->fromgame == fg_quake2)
|
||||
{
|
||||
#ifdef Q2BSPS
|
||||
CMQ2_SetAreaPortalState(cl.worldmodel, a1, !!(mode&1));
|
||||
CMQ2_SetAreaPortalState(cl.worldmodel, a1, !!(mode&1));
|
||||
#else
|
||||
(void)a1;
|
||||
(void)a1;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 0xc0:
|
||||
if (mode&2)
|
||||
|
@ -6667,20 +6670,26 @@ static void CL_ParsePortalState(void)
|
|||
a1 = MSG_ReadByte();
|
||||
a2 = MSG_ReadByte();
|
||||
}
|
||||
if (cl.worldmodel && cl.worldmodel->loadstate==MLS_LOADED && cl.worldmodel->fromgame == fg_quake3)
|
||||
{
|
||||
#ifdef Q3BSPS
|
||||
CMQ3_SetAreaPortalState(cl.worldmodel, a1, a2, !!(mode&1));
|
||||
CMQ3_SetAreaPortalState(cl.worldmodel, a1, a2, !!(mode&1));
|
||||
#else
|
||||
(void)a1;
|
||||
(void)a2;
|
||||
(void)a1;
|
||||
(void)a2;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
//to be phased out.
|
||||
mode |= MSG_ReadByte()<<8;
|
||||
if (cl.worldmodel && cl.worldmodel->loadstate==MLS_LOADED && cl.worldmodel->fromgame == fg_quake2)
|
||||
{
|
||||
#ifdef Q2BSPS
|
||||
CMQ2_SetAreaPortalState(cl.worldmodel, mode & 0x7fff, !!(mode&0x8000));
|
||||
CMQ2_SetAreaPortalState(cl.worldmodel, mode & 0x7fff, !!(mode&0x8000));
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -844,7 +844,7 @@ typedef struct
|
|||
//
|
||||
// information that is static for the entire time connected to a server
|
||||
//
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
char model_name_vwep[MAX_VWEP_MODELS][MAX_QPATH];
|
||||
struct model_s *model_precache_vwep[MAX_VWEP_MODELS];
|
||||
#endif
|
||||
|
|
|
@ -784,13 +784,13 @@ static int Stats_ExtractName(const char **line)
|
|||
|
||||
qboolean Stats_ParsePickups(const char *line)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//fixme: rework this to support custom strings, with custom pickup icons
|
||||
if (!Q_strncmp(line, "You got the ", 12)) //weapons, ammo, keys, powerups
|
||||
return true;
|
||||
if (!Q_strncmp(line, "You got armor", 13)) //caaake...
|
||||
return true;
|
||||
if (!Q_strncmp(line, "You get ", 8)) //backpackets
|
||||
if (!Q_strncmp(line, "You get ", 8)) //backpacks
|
||||
return true;
|
||||
if (!Q_strncmp(line, "You receive ", 12)) //%i health\n
|
||||
return true;
|
||||
|
|
|
@ -786,6 +786,7 @@ qbyte *ReadTargaFile(qbyte *buf, int length, int *width, int *height, uploadfmt_
|
|||
|
||||
qboolean WriteTGA(char *filename, enum fs_relative fsroot, const qbyte *fte_restrict rgb_buffer, int bytestride, int width, int height, enum uploadfmt fmt)
|
||||
{
|
||||
qboolean success = false;
|
||||
size_t c, i;
|
||||
vfsfile_t *vfs;
|
||||
if (fmt != TF_BGRA32 && fmt != TF_RGB24 && fmt != TF_RGBA32 && fmt != TF_BGR24 && fmt != TF_RGBX32 && fmt != TF_BGRX32)
|
||||
|
@ -877,9 +878,9 @@ qboolean WriteTGA(char *filename, enum fs_relative fsroot, const qbyte *fte_rest
|
|||
free(rgb_out);
|
||||
}
|
||||
|
||||
VFS_CLOSE(vfs);
|
||||
success = VFS_CLOSE(vfs);
|
||||
}
|
||||
return true;
|
||||
return success;
|
||||
}
|
||||
|
||||
#ifdef AVAIL_PNGLIB
|
||||
|
@ -1411,8 +1412,10 @@ err:
|
|||
qpng_write_end(png_ptr, info_ptr);
|
||||
BZ_Free(row_pointers);
|
||||
qpng_destroy_write_struct(&png_ptr, &info_ptr);
|
||||
fclose(fp);
|
||||
return true;
|
||||
if (0==fclose(fp))
|
||||
return true;
|
||||
Con_Printf("File error writing %s\n", filename);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2553,6 +2556,7 @@ qboolean WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int in
|
|||
int bits = 32;
|
||||
int extraheadersize = sizeof(h4);
|
||||
size_t fsize;
|
||||
qboolean success;
|
||||
|
||||
memset(&h4, 0, sizeof(h4));
|
||||
h4.ColourSpace[0] = 'W';
|
||||
|
@ -2669,10 +2673,10 @@ qboolean WriteBMPFile(char *filename, enum fs_relative fsroot, qbyte *in, int in
|
|||
in += instride;
|
||||
}
|
||||
|
||||
COM_WriteFile(filename, fsroot, data, fsize);
|
||||
success = COM_WriteFile(filename, fsroot, data, fsize);
|
||||
BZ_Free(data);
|
||||
|
||||
return true;
|
||||
return success;
|
||||
}
|
||||
|
||||
static qbyte *ReadICOFile(const char *fname, qbyte *buf, int length, int *width, int *height, uploadfmt_t *fmt)
|
||||
|
@ -4875,7 +4879,7 @@ static struct
|
|||
{"textures/%s/%s%s",3, 1}, /*fuhquake compatibility*/
|
||||
{"%s/%s%s", 3, 1}, /*fuhquake compatibility*/
|
||||
{"textures/%s%s", 2, 1}, /*directly named texture with textures/ prefix*/
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
{"override/%s%s", 2, 1} /*tenebrae compatibility*/
|
||||
#endif
|
||||
};
|
||||
|
|
|
@ -33,10 +33,10 @@
|
|||
#else
|
||||
#define PHPMIN
|
||||
#endif
|
||||
#ifdef NOLEGACY
|
||||
#define PHPLEG "&leg=0&test=1"
|
||||
#else
|
||||
#ifdef HAVE_LEGACY
|
||||
#define PHPLEG "&leg=1&test=1"
|
||||
#else
|
||||
#define PHPLEG "&leg=0&test=1"
|
||||
#endif
|
||||
#if defined(_DEBUG) || defined(DEBUG)
|
||||
#define PHPDBG "&dbg=1"
|
||||
|
|
|
@ -1335,7 +1335,7 @@ menucombo_t *MC_AddCombo(menu_t *menu, int tx, int cx, int y, const char *captio
|
|||
}
|
||||
newops[i] = NULL;
|
||||
|
||||
if (initialvalue >= n->numoptions)
|
||||
if (initialvalue && initialvalue >= n->numoptions)
|
||||
{
|
||||
Con_Printf("WARNING: Fixed initialvalue for %s\n", caption);
|
||||
initialvalue = n->numoptions-1;
|
||||
|
@ -1681,7 +1681,7 @@ changed:
|
|||
{
|
||||
combo->selectedoption--;
|
||||
if (combo->selectedoption < 0)
|
||||
combo->selectedoption = combo->numoptions-1;
|
||||
combo->selectedoption = combo->numoptions?combo->numoptions-1:0;
|
||||
goto changed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -393,7 +393,7 @@ qboolean Media_NamedTrack(const char *track, const char *looptrack)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
if (!tracknum) //might as well require exact file
|
||||
{
|
||||
Q_snprintfz(trackname, sizeof(trackname), "%s", track);
|
||||
|
@ -2988,9 +2988,14 @@ static void QDECL capture_raw_video (void *vctx, int frame, void *data, int stri
|
|||
char filename[MAX_OSPATH];
|
||||
ctx->frames = frame+1;
|
||||
Q_snprintfz(filename, sizeof(filename), "%s%8.8i.%s", ctx->videonameprefix, frame, ctx->videonameextension);
|
||||
SCR_ScreenShot(filename, ctx->fsroot, &data, 1, stride, width, height, fmt, true);
|
||||
if (SCR_ScreenShot(filename, ctx->fsroot, &data, 1, stride, width, height, fmt, true))
|
||||
{
|
||||
Sys_Sleep(1);
|
||||
if (SCR_ScreenShot(filename, ctx->fsroot, &data, 1, stride, width, height, fmt, true))
|
||||
Con_DPrintf("Error writing frame %s\n", filename);
|
||||
}
|
||||
|
||||
if (capturethrottlesize.ival)
|
||||
if (capturethrottlesize.value)
|
||||
{
|
||||
char base[MAX_QPATH];
|
||||
Q_strncpyz(base, ctx->videonameprefix, sizeof(base));
|
||||
|
|
|
@ -605,23 +605,35 @@ void M_Menu_Audio_f (void)
|
|||
};
|
||||
#ifdef VOICECHAT
|
||||
static const char *voipcodecoptions[] = {
|
||||
"Speex (ez-compat)",
|
||||
// "Raw16 (11025)",
|
||||
#ifdef HAVE_OPUS
|
||||
"Opus",
|
||||
#endif
|
||||
#ifdef HAVE_SPEEX
|
||||
#ifdef HAVE_LEGACY
|
||||
"Speex (ez-compat)",
|
||||
#endif
|
||||
"Speex (Narrow)",
|
||||
"Speex (Wide)",
|
||||
// "Speex (UltraWide)",
|
||||
#endif
|
||||
// "Raw16 (11025)",
|
||||
// "PCM A-Law",
|
||||
// "PCM U-Law",
|
||||
NULL
|
||||
};
|
||||
static const char *voipcodecvalue[] = {
|
||||
"0", //speex non-standard (outdated)
|
||||
// "1", //pcm16 sucks
|
||||
#ifdef HAVE_OPUS
|
||||
"2", //opus
|
||||
#endif
|
||||
#ifdef HAVE_SPEEX
|
||||
#ifdef HAVE_LEGACY
|
||||
"0", //speex non-standard (outdated)
|
||||
#endif
|
||||
"3", //speex narrow
|
||||
"4", //speex wide
|
||||
// "5", //speex UW
|
||||
#endif
|
||||
// "1", //pcm16 sucks
|
||||
// "6", //pcma
|
||||
// "7", //pcmu
|
||||
NULL
|
||||
|
|
|
@ -44,10 +44,10 @@ typedef enum
|
|||
#define MAX_BONE_CONTROLLERS 5
|
||||
#endif
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#define FRAME_BLENDS 2
|
||||
#else
|
||||
#ifdef HAVE_LEGACY
|
||||
#define FRAME_BLENDS 4 //for compat with DP (for mods that want 4-way blending yet refuse to use framegroups properly). real mods should be using skeletal objects allowing for N-way blending.
|
||||
#else
|
||||
#define FRAME_BLENDS 2
|
||||
#endif
|
||||
|
||||
#define FST_BASE 0 //base frames
|
||||
|
|
|
@ -75,7 +75,7 @@ qboolean Master_MasterProtocolIsEnabled(enum masterprotocol_e protocol)
|
|||
|
||||
#ifdef HAVE_SERVER
|
||||
static void QDECL Net_Masterlist_Callback(struct cvar_s *var, char *oldvalue);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void SV_SetMaster_f (void);
|
||||
#endif
|
||||
#else
|
||||
|
@ -535,7 +535,7 @@ void SV_Master_Heartbeat (void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void SV_Master_Add(int type, char *stringadr)
|
||||
{
|
||||
int i;
|
||||
|
@ -3652,7 +3652,7 @@ void Net_Master_Init(void)
|
|||
int i;
|
||||
for (i = 0; net_masterlist[i].cv.name; i++)
|
||||
Cvar_Register(&net_masterlist[i].cv, "master servers");
|
||||
#if defined(HAVE_SERVER) && !defined(NOLEGACY)
|
||||
#if defined(HAVE_SERVER) && defined(HAVE_LEGACY)
|
||||
Cmd_AddCommand ("setmaster", SV_SetMaster_f);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -48,10 +48,10 @@ static int rand(void)
|
|||
|
||||
#include "renderque.h"
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#define R_PARTSET_BUILTINS
|
||||
#else
|
||||
#ifdef HAVE_LEGACY
|
||||
#include "r_partset.h"
|
||||
#else
|
||||
#define R_PARTSET_BUILTINS
|
||||
#endif
|
||||
|
||||
struct
|
||||
|
@ -363,7 +363,7 @@ static pcfg_t *loadedconfigs;
|
|||
#define crand() (rand()%32767/16383.5f-1)
|
||||
|
||||
static void P_ReadPointFile_f (void);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void P_ExportBuiltinSet_f(void);
|
||||
#endif
|
||||
|
||||
|
@ -1402,7 +1402,7 @@ void P_ParticleEffect_f(void)
|
|||
}
|
||||
else if (!strcmp(var, "alpharand"))
|
||||
ptype->alpharand = atof(value);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strcmp(var, "alphachange"))
|
||||
{
|
||||
Con_DPrintf("%s.%s: alphachange is deprecated, use alphadelta\n", ptype->config, ptype->name);
|
||||
|
@ -1429,7 +1429,7 @@ void P_ParticleEffect_f(void)
|
|||
ptype->randdie = mx-mn;
|
||||
}
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strcmp(var, "diesubrand"))
|
||||
{
|
||||
Con_DPrintf("%s.%s: diesubrand is deprecated, use die with two arguments\n", ptype->config, ptype->name);
|
||||
|
@ -1915,7 +1915,7 @@ parsefluid:
|
|||
else if (!strcmp(value, "syncfield"))
|
||||
{
|
||||
ptype->spawnmode = SM_FIELD;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
ptype->spawnparam1 = 16;
|
||||
ptype->spawnparam2 = 0;
|
||||
#endif
|
||||
|
@ -1971,7 +1971,7 @@ parsefluid:
|
|||
ptype->looks.type = PT_CDECAL;
|
||||
settype = true;
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strcmp(var, "isbeam"))
|
||||
{
|
||||
Con_DPrintf("%s.%s: isbeam is deprecated, use type beam\n", ptype->config, ptype->name);
|
||||
|
@ -2016,7 +2016,7 @@ parsefluid:
|
|||
else if (!strcmp(var, "emitstart"))
|
||||
ptype->emitstart = atof(value);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
// old names
|
||||
else if (!strcmp(var, "areaspread"))
|
||||
{
|
||||
|
@ -2056,7 +2056,7 @@ parsefluid:
|
|||
ptype->spawnvelvert = atof(Cmd_Argv(2));
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
// spawn mode param fields
|
||||
else if (!strcmp(var, "spawnparam1"))
|
||||
{
|
||||
|
@ -2078,7 +2078,7 @@ parsefluid:
|
|||
{
|
||||
if (!strcmp(value, "none"))
|
||||
ptype->rampmode = RAMP_NONE;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strcmp(value, "absolute"))
|
||||
{
|
||||
Con_DPrintf("%s.%s: 'rampmode absolute' is deprecated, use 'rampmode nearest'\n", ptype->config, ptype->name);
|
||||
|
@ -2599,7 +2599,7 @@ qboolean PScript_Query(int typenum, int body, char *outstr, int outstrlen)
|
|||
return false;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void P_ExportAllEffects_f(void)
|
||||
{
|
||||
char effect[8192];
|
||||
|
@ -2806,7 +2806,7 @@ static void FinishParticleType(part_type_t *ptype)
|
|||
r_plooksdirty = true;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void FinishEffectinfoParticleType(part_type_t *ptype, qboolean blooddecalonimpact)
|
||||
{
|
||||
if (ptype->looks.type == PT_CDECAL)
|
||||
|
@ -3384,7 +3384,7 @@ static qboolean PScript_InitParticles (void)
|
|||
|
||||
pe_script_enabled = true;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cmd_AddCommand("r_exportbuiltinparticles", P_ExportBuiltinSet_f);
|
||||
Cmd_AddCommandD("r_converteffectinfo", P_ConvertEffectInfo_f, "Attempt to convert particle effects made for a certain other engine.");
|
||||
Cmd_AddCommand("r_exportalleffects", P_ExportAllEffects_f);
|
||||
|
@ -3528,7 +3528,7 @@ static void PScript_ClearParticles (void)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static void P_ExportBuiltinSet_f(void)
|
||||
{
|
||||
char *efname = Cmd_Argv(1);
|
||||
|
@ -3629,7 +3629,7 @@ static qboolean P_LoadParticleSet(char *name, qboolean implicit, qboolean showwa
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!strcmp(name, "effectinfo"))
|
||||
{
|
||||
//FIXME: we're loading this too early to deal with per-map stuff.
|
||||
|
|
|
@ -64,7 +64,7 @@ float csqc_starttime; //reset on each csqc reload to restore lost precision of c
|
|||
int csqc_playerseat; //can be negative.
|
||||
static playerview_t *csqc_playerview;
|
||||
qboolean csqc_dp_lastwas3d; //to emulate DP correctly, we need to track whether drawpic/drawfill or clearscene was called last. blame 515.
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
#define csqc_isdarkplaces false //hopefully this will allow a smart enough compiler to optimise it out cleanly
|
||||
#else
|
||||
static qboolean csqc_isdarkplaces;
|
||||
|
@ -100,7 +100,7 @@ extern sfx_t *cl_sfx_ric3;
|
|||
extern sfx_t *cl_sfx_r_exp3;
|
||||
|
||||
#define ENDLIST //clarifies \ in list macros.
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
#define legacycsqcglobals
|
||||
#else
|
||||
#define legacycsqcglobals \
|
||||
|
@ -372,7 +372,7 @@ static void CSQC_FindGlobals(qboolean nofuncs)
|
|||
csqcg.f_drawscores = 0;
|
||||
}
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
{
|
||||
etype_t etype = ev_void;
|
||||
if (!csqcg.trace_surfaceflagsi)
|
||||
|
@ -2641,7 +2641,7 @@ static void cs_settracevars(pubprogfuncs_t *prinst, trace_t *tr)
|
|||
*csqcg.trace_ent = EDICT_TO_PROG(csqcprogs, (void*)csqc_world.edicts);
|
||||
*csqcg.trace_networkentity = tr->entnum;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
*csqcg.trace_endcontentsf = tr->contents;
|
||||
*csqcg.trace_surfaceflagsf = tr->surface?tr->surface->flags:0;
|
||||
|
||||
|
@ -3897,7 +3897,7 @@ static const char *PF_cs_getplayerkey_internal (unsigned int pnum, const char *k
|
|||
else
|
||||
sprintf(ret, "'%g %g %g'", ((col&0xff0000)>>16)/255.0, ((col&0x00ff00)>>8)/255.0, ((col&0x0000ff)>>0)/255.0);
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (csqc_isdarkplaces && !strcmp(keyname, "colors")) //checks to see if a player has locally been set to ignored (for text chat)
|
||||
{
|
||||
ret = buffer;
|
||||
|
@ -8150,7 +8150,7 @@ qboolean CSQC_DrawView(void)
|
|||
|
||||
CSQC_RunThreads(); //wake up any qc threads
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (csqcg.autocvar_vid_conwidth)
|
||||
*csqcg.autocvar_vid_conwidth = vid.width;
|
||||
if (csqcg.autocvar_vid_conheight)
|
||||
|
|
|
@ -300,7 +300,7 @@ void QCBUILTIN PF_CL_loadfont (pubprogfuncs_t *prinst, struct globalvars_s *pr_g
|
|||
G_FLOAT(OFS_RETURN) = slotnum;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
void CL_LoadFont_f(void)
|
||||
{
|
||||
//console command for compat with dp/debug.
|
||||
|
@ -2802,7 +2802,7 @@ void MP_RegisterCvarsAndCmds(void)
|
|||
Cmd_AddCommand("coredump_menuqc", MP_CoreDump_f);
|
||||
Cmd_AddCommand("menu_cmd", MP_GameCommand_f);
|
||||
Cmd_AddCommand("breakpoint_menu", MP_Breakpoint_f);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cmd_AddCommand("loadfont", CL_LoadFont_f);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -311,7 +311,7 @@ extern cvar_t com_protocolname;
|
|||
extern cvar_t com_protocolversion;
|
||||
extern cvar_t com_nogamedirnativecode;
|
||||
extern cvar_t com_parseutf8;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
extern cvar_t ezcompat_markup;
|
||||
#endif
|
||||
extern cvar_t sys_ticrate;
|
||||
|
|
|
@ -43,7 +43,7 @@ static const texid_t r_nulltex = NULL;
|
|||
//desktop-gl will generally cope with ints, but expect a performance hit from that with old gpus (so we don't bother)
|
||||
//vulkan+dx10 can cope with ints, but might be 24bit
|
||||
//either way, all renderers in the same build need to use the same thing.
|
||||
#if (defined(GLQUAKE) && !defined(NOLEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID)
|
||||
#if (defined(GLQUAKE) && defined(HAVE_LEGACY)) || defined(MINIMAL) || defined(D3D8QUAKE) || defined(D3D9QUAKE) || defined(ANDROID)
|
||||
#define sizeof_index_t 2
|
||||
#endif
|
||||
#if sizeof_index_t == 2
|
||||
|
|
|
@ -1030,7 +1030,7 @@ void Renderer_Init(void)
|
|||
Cvar_Register (&r_polygonoffset_stencil_offset, GLRENDEREROPTIONS);
|
||||
|
||||
Cvar_Register (&r_forceprogramify, GLRENDEREROPTIONS);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register (&dpcompat_nopremulpics, GLRENDEREROPTIONS);
|
||||
#endif
|
||||
#ifdef VKQUAKE
|
||||
|
@ -1760,7 +1760,7 @@ TRACE(("dbg: R_ApplyRenderer: reloading ALL models\n"));
|
|||
cl.model_precache[i] = Mod_FindName (Mod_FixName(cl.model_name[i], cl.model_name[1]));
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
for (i=0; i < MAX_VWEP_MODELS; i++)
|
||||
{
|
||||
if (*cl.model_name_vwep[i])
|
||||
|
|
|
@ -19,7 +19,7 @@ We also have no doppler with WebAudio.
|
|||
qboolean firefoxstaticsounds; //FireFox bugs out with static sounds. they all end up full volume AND THIS IS REALLY LOUD AND REALLY ANNOYING.
|
||||
#else
|
||||
#define SDRVNAME "OpenAL"
|
||||
// #define USEEFX
|
||||
#define USEEFX
|
||||
#endif
|
||||
|
||||
#ifdef OPENAL_STATIC
|
||||
|
|
|
@ -285,13 +285,19 @@ enum
|
|||
|
||||
VOIP_INVALID = 16 //not currently generating audio.
|
||||
};
|
||||
#ifdef NOLEGACY
|
||||
#define VOIP_DEFAULT_CODEC VOIP_OPUS
|
||||
#if defined(HAVE_LEGACY) && defined(HAVE_OPUS) && defined(HAVE_SPEEX)
|
||||
#define VOIP_DEFAULT_CODEC ((cls.protocol==CP_QUAKEWORLD && !(cls.fteprotocolextensions2&PEXT2_REPLACEMENTDELTAS))?VOIP_SPEEX_OLD:VOIP_OPUS) //opus is preferred, but ezquake is still common and only supports my first attempt at voice compression so favour that for mvdsv servers.
|
||||
#elif defined(HAVE_OPUS)
|
||||
#define VOIP_DEFAULT_CODEC VOIP_OPUS
|
||||
#elif defined(HAVE_SPEEX)
|
||||
#define VOIP_DEFAULT_CODEC VOIP_SPEEX_OLD
|
||||
#else
|
||||
#define VOIP_DEFAULT_CODEC ((cls.protocol==CP_QUAKEWORLD && !(cls.fteprotocolextensions2&PEXT2_REPLACEMENTDELTAS))?VOIP_SPEEX_OLD:VOIP_OPUS) //opus is preferred, but ezquake is still common and only supports my first attempt at voice compression so favour that for mvdsv servers.
|
||||
#define VOIP_DEFAULT_CODEC VOIP_PCMA
|
||||
#endif
|
||||
|
||||
static struct
|
||||
{
|
||||
#ifdef HAVE_SPEEX
|
||||
struct
|
||||
{
|
||||
qboolean inited;
|
||||
|
@ -316,13 +322,16 @@ static struct
|
|||
int curframesize;
|
||||
int cursamplerate;
|
||||
} speexdsp;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_OPUS
|
||||
struct
|
||||
{
|
||||
qboolean inited;
|
||||
qboolean loaded;
|
||||
dllhandle_t *opuslib;
|
||||
} opus;
|
||||
#endif
|
||||
|
||||
unsigned char enccodec;
|
||||
void *encoder;
|
||||
|
@ -354,6 +363,7 @@ static struct
|
|||
void *cdriverctx; /*capture driver context*/
|
||||
} s_voip;
|
||||
|
||||
#ifdef HAVE_OPUS
|
||||
#define OPUS_APPLICATION_VOIP 2048
|
||||
#define OPUS_SET_BITRATE_REQUEST 4002
|
||||
#define OPUS_RESET_STATE 4028
|
||||
|
@ -396,7 +406,33 @@ static dllfunction_t qopusfuncs[] =
|
|||
};
|
||||
#endif
|
||||
|
||||
static qboolean S_Opus_Init(void)
|
||||
{
|
||||
#ifndef OPUS_STATIC
|
||||
#ifdef _WIN32
|
||||
char *modulename = "libopus-0" ARCH_DL_POSTFIX;
|
||||
#else
|
||||
char *modulename = "libopus"ARCH_DL_POSTFIX".0";
|
||||
#endif
|
||||
|
||||
if (s_voip.opus.inited)
|
||||
return s_voip.opus.loaded;
|
||||
s_voip.opus.inited = true;
|
||||
|
||||
s_voip.opus.opuslib = Sys_LoadLibrary(modulename, qopusfuncs);
|
||||
if (!s_voip.opus.opuslib)
|
||||
{
|
||||
Con_Printf("%s not found. Voice chat is not available.\n", modulename);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
s_voip.opus.loaded = true;
|
||||
return s_voip.opus.loaded;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_SPEEX
|
||||
#ifdef SPEEX_STATIC
|
||||
#define qspeex_lib_get_mode speex_lib_get_mode
|
||||
#define qspeex_bits_init speex_bits_init
|
||||
|
@ -466,24 +502,6 @@ static dllfunction_t qspeexdspfuncs[] =
|
|||
};
|
||||
#endif
|
||||
|
||||
#ifdef AVAIL_OPENAL
|
||||
extern snd_capture_driver_t OPENAL_Capture;
|
||||
#endif
|
||||
snd_capture_driver_t DSOUND_Capture;
|
||||
snd_capture_driver_t OSS_Capture;
|
||||
snd_capture_driver_t SDL_Capture;
|
||||
|
||||
snd_capture_driver_t *capturedrivers[] =
|
||||
{
|
||||
&DSOUND_Capture,
|
||||
&SDL_Capture,
|
||||
&OSS_Capture,
|
||||
#ifdef AVAIL_OPENAL
|
||||
&OPENAL_Capture,
|
||||
#endif
|
||||
NULL
|
||||
};
|
||||
|
||||
static qboolean S_SpeexDSP_Init(void)
|
||||
{
|
||||
#ifndef SPEEX_STATIC
|
||||
|
@ -491,7 +509,7 @@ static qboolean S_SpeexDSP_Init(void)
|
|||
return s_voip.speexdsp.loaded;
|
||||
s_voip.speexdsp.inited = true;
|
||||
|
||||
|
||||
|
||||
s_voip.speexdsp.speexdsplib = Sys_LoadLibrary("libspeexdsp", qspeexdspfuncs);
|
||||
if (!s_voip.speexdsp.speexdsplib)
|
||||
{
|
||||
|
@ -526,31 +544,25 @@ static qboolean S_Speex_Init(void)
|
|||
s_voip.speex.loaded = true;
|
||||
return s_voip.speex.loaded;
|
||||
}
|
||||
#endif
|
||||
|
||||
static qboolean S_Opus_Init(void)
|
||||
#ifdef AVAIL_OPENAL
|
||||
extern snd_capture_driver_t OPENAL_Capture;
|
||||
#endif
|
||||
snd_capture_driver_t DSOUND_Capture;
|
||||
snd_capture_driver_t OSS_Capture;
|
||||
snd_capture_driver_t SDL_Capture;
|
||||
|
||||
snd_capture_driver_t *capturedrivers[] =
|
||||
{
|
||||
#ifndef OPUS_STATIC
|
||||
#ifdef _WIN32
|
||||
char *modulename = "libopus-0" ARCH_DL_POSTFIX;
|
||||
#else
|
||||
char *modulename = "libopus"ARCH_DL_POSTFIX".0";
|
||||
&DSOUND_Capture,
|
||||
&SDL_Capture,
|
||||
&OSS_Capture,
|
||||
#ifdef AVAIL_OPENAL
|
||||
&OPENAL_Capture,
|
||||
#endif
|
||||
|
||||
if (s_voip.opus.inited)
|
||||
return s_voip.opus.loaded;
|
||||
s_voip.opus.inited = true;
|
||||
|
||||
s_voip.opus.opuslib = Sys_LoadLibrary(modulename, qopusfuncs);
|
||||
if (!s_voip.opus.opuslib)
|
||||
{
|
||||
Con_Printf("%s not found. Voice chat is not available.\n", modulename);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
s_voip.opus.loaded = true;
|
||||
return s_voip.opus.loaded;
|
||||
}
|
||||
NULL
|
||||
};
|
||||
|
||||
size_t PCMA_Decode(short *out, unsigned char *in, size_t samples)
|
||||
{
|
||||
|
@ -840,6 +852,7 @@ void S_Voip_Decode(unsigned int sender, unsigned int codec, unsigned int gen, un
|
|||
default:
|
||||
bytes = 0;
|
||||
break;
|
||||
#ifdef HAVE_SPEEX
|
||||
case VOIP_SPEEX_OLD:
|
||||
case VOIP_SPEEX_NARROW:
|
||||
case VOIP_SPEEX_WIDE:
|
||||
|
@ -868,6 +881,7 @@ void S_Voip_Decode(unsigned int sender, unsigned int codec, unsigned int gen, un
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case VOIP_RAW16:
|
||||
len = min(bytes, sizeof(decodebuf)-(sizeof(decodebuf[0])*decodesamps));
|
||||
memcpy(decodebuf+decodesamps, start, len);
|
||||
|
@ -889,6 +903,7 @@ void S_Voip_Decode(unsigned int sender, unsigned int codec, unsigned int gen, un
|
|||
bytes -= len;
|
||||
start += len;
|
||||
break;
|
||||
#ifdef HAVE_OPUS
|
||||
case VOIP_OPUS:
|
||||
len = bytes;
|
||||
if (decodesamps > 0)
|
||||
|
@ -911,6 +926,7 @@ void S_Voip_Decode(unsigned int sender, unsigned int codec, unsigned int gen, un
|
|||
bytes -= len;
|
||||
start += len;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1129,8 +1145,10 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
{
|
||||
voipsendenable = true;
|
||||
//if rtp streaming is enabled, hack the codec to something better supported
|
||||
#ifdef HAVE_SPEEX
|
||||
if (voipcodec == VOIP_SPEEX_OLD)
|
||||
voipcodec = VOIP_SPEEX_WIDE;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -1154,14 +1172,18 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
}
|
||||
switch(s_voip.enccodec)
|
||||
{
|
||||
#ifdef HAVE_SPEEX
|
||||
case VOIP_SPEEX_OLD:
|
||||
case VOIP_SPEEX_NARROW:
|
||||
case VOIP_SPEEX_WIDE:
|
||||
case VOIP_SPEEX_ULTRAWIDE:
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_OPUS
|
||||
case VOIP_OPUS:
|
||||
qopus_encoder_destroy(s_voip.encoder);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
s_voip.encoder = NULL;
|
||||
s_voip.enccodec = VOIP_INVALID;
|
||||
|
@ -1182,6 +1204,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
/*see if we can init our encoding codec...*/
|
||||
switch(voipcodec)
|
||||
{
|
||||
#ifdef HAVE_SPEEX
|
||||
case VOIP_SPEEX_OLD:
|
||||
case VOIP_SPEEX_NARROW:
|
||||
case VOIP_SPEEX_WIDE:
|
||||
|
@ -1218,6 +1241,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
qspeex_encoder_ctl(s_voip.encoder, SPEEX_SET_SAMPLING_RATE, &s_voip.encsamplerate);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case VOIP_PCMA:
|
||||
case VOIP_PCMU:
|
||||
s_voip.encsamplerate = 8000;
|
||||
|
@ -1227,6 +1251,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
s_voip.encsamplerate = 11025;
|
||||
s_voip.encframesize = 256;
|
||||
break;
|
||||
#ifdef HAVE_OPUS
|
||||
case VOIP_OPUS:
|
||||
if (!S_Opus_Init())
|
||||
{
|
||||
|
@ -1255,9 +1280,8 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
|
||||
// opus_encoder_ctl(s_voip.encoder, OPUS_GET_LOOKAHEAD(&skip));
|
||||
// opus_encoder_ctl(s_voip.encoder, OPUS_SET_LSB_DEPTH(16));
|
||||
|
||||
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
Con_Printf("Unable to use that codec - not implemented\n");
|
||||
//can't start up other coedcs, cos we're too lame.
|
||||
|
@ -1365,6 +1389,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
|
||||
switch(s_voip.enccodec)
|
||||
{
|
||||
#ifdef HAVE_SPEEX
|
||||
case VOIP_SPEEX_OLD:
|
||||
//this is from before I understood speex properly.
|
||||
level += S_Voip_Preprocess(start, s_voip.encframesize, micamp);
|
||||
|
@ -1399,6 +1424,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
len = qspeex_bits_write(&s_voip.speex.encbits, outbuf+outpos, sizeof(outbuf) - outpos);
|
||||
outpos += len;
|
||||
break;
|
||||
#endif
|
||||
case VOIP_RAW16:
|
||||
len = s_voip.capturepos-encpos; //amount of data to be eaten in this frame
|
||||
len = min(len, sizeof(outbuf)-outpos);
|
||||
|
@ -1426,6 +1452,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
s_voip.encsequence++; //increment number of packets, for packetloss detection.
|
||||
samps+=len / 2; //number of samplepairs eaten in this packet. for stats.
|
||||
break;
|
||||
#ifdef HAVE_OPUS
|
||||
case VOIP_OPUS:
|
||||
{
|
||||
//opus rtp only supports/allows a single chunk in each packet.
|
||||
|
@ -1478,6 +1505,7 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
}
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
outbuf[outpos] = 0;
|
||||
break;
|
||||
|
@ -1550,21 +1578,25 @@ void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
|
|||
{
|
||||
switch(s_voip.enccodec)
|
||||
{
|
||||
#ifdef HAVE_SPEEX
|
||||
case VOIP_SPEEX_NARROW:
|
||||
case VOIP_SPEEX_WIDE:
|
||||
case VOIP_SPEEX_ULTRAWIDE:
|
||||
case VOIP_SPEEX_OLD:
|
||||
NET_RTP_Transmit(initseq, inittimestamp, va("speex@%i", s_voip.encsamplerate), outbuf, outpos);
|
||||
break;
|
||||
#endif
|
||||
case VOIP_PCMA:
|
||||
NET_RTP_Transmit(initseq, inittimestamp, "pcma@8000", outbuf, outpos);
|
||||
break;
|
||||
case VOIP_PCMU:
|
||||
NET_RTP_Transmit(initseq, inittimestamp, "pcmu@8000", outbuf, outpos);
|
||||
break;
|
||||
#ifdef HAVE_OPUS
|
||||
case VOIP_OPUS:
|
||||
NET_RTP_Transmit(initseq, inittimestamp, "opus@48000", outbuf, outpos);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -3861,7 +3861,7 @@ void CL_Say (qboolean team, char *extra)
|
|||
return;
|
||||
//messagemode always adds quotes. the console command never did.
|
||||
//the server is expected to use Cmd_Args and to strip first+last chars if the first is a quote. this is annoying and clumsy for mods to parse.
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!dpcompat_console.ival)
|
||||
CL_SendClientCommand(true, "%s%s \"%s%s\"", split?va("%i ", split+1):"", team ? "say_team" : "say", extra?extra:"", sendtext);
|
||||
else
|
||||
|
|
|
@ -142,7 +142,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#endif
|
||||
#endif
|
||||
#ifndef NOLEGACY
|
||||
#define HAVE_LEGACY
|
||||
#define HAVE_LEGACY
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SERVER
|
||||
|
@ -518,6 +518,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#undef SQL
|
||||
#endif
|
||||
|
||||
#ifndef PLUGINS
|
||||
#undef USE_INTERNAL_BULLET
|
||||
#undef USE_INTERNAL_ODE
|
||||
#endif
|
||||
|
||||
|
||||
#if (defined(CSQC_DAT) || !defined(CLIENTONLY)) && (defined(PLUGINS)||defined(USE_INTERNAL_BULLET)||defined(USE_INTERNAL_ODE)) //use ode only if we have a constant world state, and the library is enbled in some form.
|
||||
#define USERBE
|
||||
|
|
|
@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
cvar_t ruleset_allow_in = CVAR("ruleset_allow_in", "1");
|
||||
cvar_t rcon_level = CVAR("rcon_level", "20");
|
||||
cvar_t cmd_maxbuffersize = CVAR("cmd_maxbuffersize", "65536");
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
cvar_t dpcompat_set = CVAR("dpcompat_set", "0");
|
||||
cvar_t dpcompat_console = CVARD("dpcompat_console", "0", "Enables hacks to emulate DP's console.");
|
||||
#else
|
||||
|
@ -884,7 +884,7 @@ static void Cmd_Echo_f (void)
|
|||
Con_Printf ("%s", t);
|
||||
#else
|
||||
t = TP_ParseFunChars(t);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Con_PrintFlags (t, ((ezcompat_markup.ival>=2)?PFS_EZQUAKEMARKUP:0), 0);
|
||||
#else
|
||||
Con_PrintFlags (t, 0, 0);
|
||||
|
@ -4259,7 +4259,7 @@ void Cmd_Init (void)
|
|||
Cvar_Register(&ruleset_allow_in, "Console");
|
||||
Cmd_AddCommandD ("in", Cmd_In_f, "Issues the given command after a time delay. Disabled if ruleset_allow_in is 0.");
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register(&dpcompat_set, "Darkplaces compatibility");
|
||||
Cvar_Register(&dpcompat_console, "Darkplaces compatibility");
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@ static void QDECL r_meshpitch_callback(cvar_t *var, char *oldvalue)
|
|||
else
|
||||
Cvar_ForceSet(var, "1");
|
||||
}
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
cvar_t r_meshpitch = CVARCD ("r_meshpitch", "1", r_meshpitch_callback, "Specifies the direction of the pitch angle on mesh models formats, also affects gamecode, so do not change from its default.");
|
||||
#else
|
||||
cvar_t r_meshpitch = CVARCD ("r_meshpitch", "-1", r_meshpitch_callback, "Specifies the direction of the pitch angle on mesh models formats, Quake compatibility requires -1.");
|
||||
|
@ -6300,7 +6300,7 @@ static qboolean QDECL Mod_LoadPSKModel(model_t *mod, void *buffer, size_t fsize)
|
|||
}
|
||||
num_animinfo = numgroups;
|
||||
}
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
else if (dpcompat_psa_ungroup.ival)
|
||||
{
|
||||
/*unpack each frame of each animation to be a separate framegroup*/
|
||||
|
|
|
@ -39,7 +39,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#include "../../plugins/plugin.h"
|
||||
#include "../../plugins/engine.h"
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
#undef USERBE
|
||||
#endif
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ cvar_t fs_gamename = CVARAD("com_fullgamename", NULL, "fs_gamename", "The filesy
|
|||
cvar_t com_protocolname = CVARAD("com_protocolname", NULL, "com_gamename", "The protocol game name used for dpmaster queries. For compatibility with DP, you can set this to 'DarkPlaces-Quake' in order to be listed in DP's master server, and to list DP servers.");
|
||||
cvar_t com_protocolversion = CVARAD("com_protocolversion", "3", NULL, "The protocol version used for dpmaster queries."); //3 by default, for compat with DP/NQ, even if our QW protocol uses different versions entirely. really it only matters for master servers.
|
||||
cvar_t com_parseutf8 = CVARD("com_parseutf8", "1", "Interpret console messages/playernames/etc as UTF-8. Requires special fonts. -1=iso 8859-1. 0=quakeascii(chat uses high chars). 1=utf8, revert to ascii on decode errors. 2=utf8 ignoring errors"); //1 parse. 2 parse, but stop parsing that string if a char was malformed.
|
||||
#if !defined(NOLEGACY)
|
||||
#ifdef HAVE_LEGACY
|
||||
cvar_t ezcompat_markup = CVARD("ezcompat_markup", "1", "Attempt compatibility with ezquake's text markup.0: disabled.\n1: Handle markup ampersand markup.\n2: Handle chevron markup (only in echo commands, for config compat, because its just too unreliable otherwise).");
|
||||
#endif
|
||||
cvar_t com_highlightcolor = CVARD("com_highlightcolor", STRINGIFY(COLOR_RED), "ANSI colour to be used for highlighted text, used when com_parseutf8 is active.");
|
||||
|
@ -3003,7 +3003,7 @@ char *COM_DeFunString(conchar_t *str, conchar_t *stop, char *out, int outsize, q
|
|||
return out;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static unsigned int koi2wc (unsigned char uc)
|
||||
{
|
||||
static const char koi2wc_table[64] =
|
||||
|
@ -3249,7 +3249,7 @@ conchar_t *COM_ParseFunString(conchar_t defaultflags, const char *str, conchar_t
|
|||
|
||||
conchar_t ext;
|
||||
conchar_t *oldout = out;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
extern cvar_t dpcompat_console;
|
||||
extern cvar_t ezcompat_markup;
|
||||
|
||||
|
@ -3277,7 +3277,7 @@ conchar_t *COM_ParseFunString(conchar_t defaultflags, const char *str, conchar_t
|
|||
#endif
|
||||
|
||||
if (*str == 1 || *str == 2
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
|| (*str == 3 && dpcompat_console.ival)
|
||||
#endif
|
||||
)
|
||||
|
@ -3577,7 +3577,7 @@ conchar_t *COM_ParseFunString(conchar_t defaultflags, const char *str, conchar_t
|
|||
continue;
|
||||
}
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (*str == '&' && str[1] == 'c' && !(flags & PFS_NOMARKUP) && ezcompat_markup.ival)
|
||||
{
|
||||
// ezQuake color codes
|
||||
|
@ -3983,7 +3983,7 @@ skipwhite:
|
|||
//same as COM_Parse, but parses two quotes next to each other as a single quote as part of the string
|
||||
char *COM_StringParse (const char *data, char *token, unsigned int tokenlen, qboolean expandmacros, qboolean qctokenize)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
extern cvar_t dpcompat_console;
|
||||
#endif
|
||||
int c;
|
||||
|
@ -4050,7 +4050,7 @@ skipwhite:
|
|||
if (c == '\"')
|
||||
{
|
||||
data++;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (dpcompat_console.ival)
|
||||
{
|
||||
while (1)
|
||||
|
@ -4346,7 +4346,7 @@ skipwhite:
|
|||
//maximum expansion is strlen(string)*2+4 (includes null terminator)
|
||||
const char *COM_QuotedString(const char *string, char *buf, int buflen, qboolean omitquotes)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
extern cvar_t dpcompat_console;
|
||||
#else
|
||||
static const cvar_t dpcompat_console = {0};
|
||||
|
@ -5817,7 +5817,7 @@ void COM_Init (void)
|
|||
Cvar_Register (&gameversion_max, "Gamecode");
|
||||
Cvar_Register (&com_nogamedirnativecode, "Gamecode");
|
||||
Cvar_Register (&com_parseutf8, "Internationalisation");
|
||||
#if !defined(NOLEGACY)
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register (&ezcompat_markup, NULL);
|
||||
#endif
|
||||
Cvar_Register (&com_highlightcolor, "Internationalisation");
|
||||
|
@ -5958,7 +5958,7 @@ void COM_Effectinfo_Enumerate(int (*cb)(const char *pname))
|
|||
/*remaps map checksums from known non-cheat GPL maps to authentic id1 maps.*/
|
||||
unsigned int COM_RemapMapChecksum(model_t *model, unsigned int checksum)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static const struct {
|
||||
const char *name;
|
||||
unsigned int gpl2;
|
||||
|
|
|
@ -401,7 +401,7 @@ char *COM_DeFunString(conchar_t *str, conchar_t *stop, char *out, int outsize, q
|
|||
#define PFS_KEEPMARKUP 1 //leave markup in the final string (but do parse it)
|
||||
#define PFS_FORCEUTF8 2 //force utf-8 decoding
|
||||
#define PFS_NOMARKUP 4 //strip markup completely
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
#define PFS_EZQUAKEMARKUP 8 //aim for compat with ezquake instead of q3 compat
|
||||
#endif
|
||||
#define PFS_CENTERED 16 //flag used by console prints (text should remain centered)
|
||||
|
@ -579,7 +579,7 @@ enum fs_relative{
|
|||
FS_PUBBASEGAMEONLY //qw/ (fixme: should be the last non-private basedir)
|
||||
};
|
||||
|
||||
void COM_WriteFile (const char *filename, enum fs_relative fsroot, const void *data, int len);
|
||||
qboolean COM_WriteFile (const char *filename, enum fs_relative fsroot, const void *data, int len);
|
||||
|
||||
void FS_FlushFSHashWritten(const char *fname);
|
||||
void FS_FlushFSHashRemoved(const char *fname);
|
||||
|
|
|
@ -40,7 +40,6 @@
|
|||
#define AVAIL_OPENAL
|
||||
#define AVAIL_ZLIB
|
||||
#define AVAIL_OGGVORBIS
|
||||
//#define NOMEDIA
|
||||
#define CL_MASTER
|
||||
#define CSQC_DAT
|
||||
#define MENU_DAT
|
||||
|
@ -96,7 +95,7 @@
|
|||
#undef BOTLIB_STATIC //q3 botlib
|
||||
#undef AVAIL_XZDEC //.xz decompression
|
||||
#undef AVAIL_GZDEC //.gz decompression
|
||||
#undef AVAIL_DZIP //.dzip special-case archive support
|
||||
#undef PACKAGE_DZIP //.dzip special-case archive support
|
||||
#undef AVAIL_PNGLIB //.png image format support (read+screenshots)
|
||||
#undef AVAIL_JPEGLIB //.jpeg image format support (read+screenshots)
|
||||
#undef AVAIL_MP3_ACM //.mp3 support (in windows).
|
||||
|
@ -106,7 +105,7 @@
|
|||
#undef IMAGEFMT_DDS //.dds files embed mipmaps and texture compression. faster to load.
|
||||
#undef IMAGEFMT_BLP //legacy crap
|
||||
#define IMAGEFMT_BMP //legacy crap
|
||||
//#undef IMAGEFMT_PCX //legacy crap
|
||||
////#undef IMAGEFMT_PCX //legacy crap
|
||||
#undef DECOMPRESS_ETC2
|
||||
#undef DECOMPRESS_RGTC
|
||||
#undef DECOMPRESS_S3TC
|
||||
|
@ -126,7 +125,7 @@
|
|||
#undef Q3SERVER //q3 server stuff.
|
||||
#undef HEXEN2 //runs hexen2 gamecode, supports hexen2 file formats.
|
||||
#undef NQPROT //act as an nq client/server, with nq gamecode.
|
||||
#undef WEBSERVER //sv_ftp + sv_http cvars.
|
||||
////#undef WEBSERVER //sv_ftp + sv_http cvars.
|
||||
#undef WEBCLIENT //uri_get+any internal downloads etc
|
||||
#undef RUNTIMELIGHTING //automatic generation of .lit files
|
||||
#undef R_XFLIP //old silly thing
|
||||
|
@ -137,17 +136,17 @@
|
|||
#undef SUPPORT_ICE //Internet Connectivity Establishment, for use by plugins to establish voice or game connections.
|
||||
#undef PSET_CLASSIC //support the 'classic' particle system, for that classic quake feel.
|
||||
#undef HAVE_CDPLAYER //includes cd playback. actual cds. named/numbered tracks are supported regardless (though you need to use the 'music' command to play them without this).
|
||||
#undef QTERM
|
||||
////#undef QTERM
|
||||
#undef SIDEVIEWS
|
||||
#undef MAX_SPLITS
|
||||
#undef SUBSERVERS
|
||||
#undef SV_MASTER
|
||||
////#undef SV_MASTER
|
||||
#undef HAVE_MIXER //openal only
|
||||
#undef VM_LUA
|
||||
#undef HLCLIENT
|
||||
#undef HLSERVER
|
||||
#undef FTPSERVER
|
||||
//undef CLIENTONLY //leave this up to the makefiles.
|
||||
//#undef CLIENTONLY //leave this up to the makefiles.
|
||||
#define HAVE_TCP
|
||||
#undef HAVE_GNUTLS //linux tls/dtls support
|
||||
#undef HAVE_WINSSPI //windows tls/dtls support
|
||||
|
@ -156,6 +155,26 @@
|
|||
#define HAVE_MEDIA_ENCODER //capture/capturedemo work.
|
||||
#undef HAVE_SPEECHTOTEXT //windows speech-to-text thing
|
||||
|
||||
//FIXME
|
||||
#define HAVE_OPUS
|
||||
//#define HAVE_SPEEX
|
||||
//#define HAVE_OPENSSL
|
||||
//#define IMAGEFMT_HDR
|
||||
//#define IMAGEFMT_PBM
|
||||
//#define IMAGEFMT_PSD
|
||||
//#define IMAGEFMT_VTF
|
||||
//#define IPLOG
|
||||
//#define MVD_RECORDING
|
||||
//#define PACKAGEMANAGER
|
||||
//#define PACKAGE_VPK
|
||||
//#define SAVEDGAMES
|
||||
//#define AVAIL_BOTLIB
|
||||
//#define AVAIL_BZLIB
|
||||
//#define USE_INTERNAL_ODE
|
||||
//#define USE_INTERNAL_BULLET
|
||||
//#define MENU_NATIVECODE
|
||||
|
||||
|
||||
#ifdef COMPILE_OPTS
|
||||
//things to configure qclib, which annoyingly doesn't include this file itself
|
||||
-DOMIT_QCC //disable the built-in qcc
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
#define USE_SQLITE //sql-database-as-file support
|
||||
#define IPLOG //track player's ip addresses (any decent server will hide ip addresses, so this probably isn't that useful, but nq players expect its)
|
||||
#define IPLOG //track player's ip addresses (any decent server will hide ip addresses, so this probably isn't that useful, but nq players expect it)
|
||||
|
||||
//Filesystem formats
|
||||
#define PACKAGE_PK3 //aka zips. we support utf8,zip64,spans,weakcrypto,deflate,(bzip2),symlinks. we do not support strongcrypto nor any of the other compression schemes.
|
||||
#define PACKAGE_PK3 //aka zips. we support utf8,zip64,spans,weakcrypto,(deflate),(bzip2),symlinks. we do not support strongcrypto nor any of the other compression schemes.
|
||||
#define PACKAGE_Q1PAK //also q2
|
||||
//#define PACKAGE_DOOMWAD //doom wad support (generates various file names, and adds support for doom's audio, sprites, etc)
|
||||
//#define PACKAGE_VPK //hl2 packages
|
||||
|
@ -107,6 +107,7 @@
|
|||
// Game/Gamecode Support
|
||||
#define CSQC_DAT
|
||||
#define MENU_DAT
|
||||
//#define MENU_NATIVECODE //Use an external dll for menus.
|
||||
#define VM_Q1 //q1qvm implementation, to support ktx.
|
||||
//#define VM_LUA //optionally supports lua instead of ssqc.
|
||||
#define Q2SERVER //q2 server+gamecode.
|
||||
|
@ -114,6 +115,7 @@
|
|||
#define Q3CLIENT //q3 client stuff.
|
||||
#define Q3SERVER //q3 server stuff.
|
||||
#define AVAIL_BOTLIB //q3 botlib
|
||||
//#undef BOTLIB_STATIC //should normally be set only in the makefile, and only if AVAIL_BOTLIB is defined above.
|
||||
#define HEXEN2 //runs hexen2 gamecode, supports hexen2 file formats.
|
||||
#define HUFFNETWORK //crappy network compression. probably needs reseeding.
|
||||
#define NETPREPARSE //allows for running both nq+qw on the same server (if not, protocol used must match gamecode).
|
||||
|
@ -122,6 +124,9 @@
|
|||
//#define HLSERVER 140 //we can run HL gamecode (not protocol compatible, set to 138 or 140)
|
||||
#define SAVEDGAMES //Can save the game.
|
||||
#define MVD_RECORDING //server can record MVDs.
|
||||
//#define ENGINE_ROUTING //Engine-provided routing logic (possibly threaded)
|
||||
//#define USE_INTERNAL_BULLET //Statically link against bullet physics plugin (instead of using an external plugin)
|
||||
//#define USE_INTERNAL_ODE //Statically link against ode physics plugin (instead of using an external plugin)
|
||||
|
||||
// Networking options
|
||||
#define NQPROT //act as an nq client/server, with nq gamecode.
|
||||
|
@ -150,6 +155,8 @@
|
|||
|
||||
// Other Audio Options
|
||||
#define VOICECHAT
|
||||
#define HAVE_SPEEX //Support the speex codec.
|
||||
#define HAVE_OPUS //Support the opus codec.
|
||||
#define HAVE_MEDIA_DECODER //can play cin/roq, more with plugins
|
||||
#define HAVE_MEDIA_ENCODER //capture/capturedemo work.
|
||||
#define HAVE_CDPLAYER //includes cd playback. actual cds. named/numbered tracks are supported regardless (though you need to use the 'music' command to play them without this).
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
// Later code will disable any features if they're not supported on the current platform, so don't worry about win/lin/mac/android/web/etc here - any such issues should be fixed elsewhere.
|
||||
|
||||
//general rebranding
|
||||
//#define DISTRIBUTION "FTE" //should be kept short. 3 or 4 letters is good, with no spaces.
|
||||
//#define DISTRIBUTION "FTE" //should be kept short. 8 or less letters is good, with no spaces.
|
||||
//#define DISTRIBUTIONLONG "Forethought Entertainment" //think of this as your company name. It isn't shown too often, so can be quite long.
|
||||
//#define FULLENGINENAME "FTE Quake" //nominally user-visible name.
|
||||
//#define ENGINEWEBSITE "http://fte.triptohell.info" //for shameless self-promotion purposes.
|
||||
|
@ -47,18 +47,21 @@
|
|||
#define AVAIL_DINPUT
|
||||
//#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||
//#define MAX_SPLITS 4u
|
||||
//#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
//#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
//#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
//#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
//#define USE_SQLITE //sql-database-as-file support
|
||||
//#define IPLOG //track player's ip addresses (any decent server will hide ip addresses, so this probably isn't that useful, but nq players expect it)
|
||||
|
||||
//Filesystem formats
|
||||
#define PACKAGE_PK3
|
||||
#define PACKAGE_PK3 //aka zips. we support utf8,zip64,spans,weakcrypto,(deflate),(bzip2),symlinks. we do not support strongcrypto nor any of the other compression schemes.
|
||||
#define PACKAGE_Q1PAK //also q2
|
||||
//#define PACKAGE_DOOMWAD //doom wad support (generates various file names, and adds support for doom's audio, sprites, etc)
|
||||
//#define PACKAGE_VPK //hl2 packages
|
||||
//#define AVAIL_XZDEC //.xz decompression
|
||||
//#define AVAIL_GZDEC //.gz decompression
|
||||
#define AVAIL_ZLIB //whether pk3s can be compressed or not.
|
||||
//#define AVAIL_DZIP //.dzip support for smaller demos (which are actually more like pak files and can store ANY type of file)
|
||||
#define AVAIL_ZLIB //whether pk3s can be compressed or not.
|
||||
//#define AVAIL_BZLIB //whether pk3s can use bz2 compression
|
||||
//#define PACKAGE_DZIP //.dzip support for smaller demos (which are actually more like pak files and can store ANY type of file)
|
||||
|
||||
//Map formats
|
||||
#define Q1BSPS //Quake1
|
||||
|
@ -87,42 +90,52 @@
|
|||
//Image formats
|
||||
//#define IMAGEFMT_KTX //Khronos TeXture. common on gles3 devices for etc2 compression
|
||||
//#define IMAGEFMT_PKM //file format generally written by etcpack or android's etc1tool. doesn't support mips.
|
||||
//#define IMAGEFMT_PBM //pbm/ppm/pgm/pfm family formats.
|
||||
//#define IMAGEFMT_PSD //baselayer only.
|
||||
//#define IMAGEFMT_HDR //an RGBE format.
|
||||
//#define IMAGEFMT_DDS //.dds files embed mipmaps and texture compression. faster to load.
|
||||
//#define IMAGEFMT_BLP //legacy crap
|
||||
//#define IMAGEFMT_BMP //windows bmp. yuck.
|
||||
//#define IMAGEFMT_BMP //windows bmp. yuck. also includes .ico for the luls
|
||||
//#define IMAGEFMT_PCX //paletted junk. required for qw player skins, q2 and a few old skyboxes.
|
||||
//#define IMAGEFMT_VTF //hl2 image format
|
||||
#define AVAIL_PNGLIB //.png image format support (read+screenshots)
|
||||
//#define AVAIL_JPEGLIB //.jpeg image format support (read+screenshots)
|
||||
#define PACKAGE_TEXWAD //quake's image wad support
|
||||
//#define AVAIL_FREETYPE //for truetype font rendering
|
||||
//#define DECOMPRESS_ETC2 //decompress etc2(core in gles3/gl4.3) if the graphics driver doesn't support it (eg d3d or crappy gpus with vulkan).
|
||||
////#define DECOMPRESS_S3TC //allows bc1-3 to work even when drivers don't support it. This is probably only an issue on mobile chips. WARNING: not entirely sure if all patents expired yet...
|
||||
//#define DECOMPRESS_RGTC //bc4+bc5
|
||||
//#define AVAIL_FREETYPE //for truetype font rendering
|
||||
//#define DECOMPRESS_ETC2 //decompress etc2(core in gles3/gl4.3) if the graphics driver doesn't support it (eg d3d or crappy gpus with vulkan).
|
||||
//#define DECOMPRESS_S3TC //allows bc1-3 to work even when drivers don't support it. This is probably only an issue on mobile chips. WARNING: not entirely sure if all patents expired yet...
|
||||
//#define DECOMPRESS_RGTC //bc4+bc5
|
||||
|
||||
// Game/Gamecode Support
|
||||
//#define CSQC_DAT
|
||||
//#define MENU_DAT
|
||||
//#define MENU_NATIVECODE //Use an external dll for menus.
|
||||
//#define VM_Q1 //q1qvm implementation, to support ktx.
|
||||
////#define VM_LUA //optionally supports lua instead of ssqc.
|
||||
//#define VM_LUA //optionally supports lua instead of ssqc.
|
||||
//#define Q2SERVER //q2 server+gamecode.
|
||||
//#define Q2CLIENT //q2 client. file formats enabled separately.
|
||||
//#define Q3CLIENT //q3 client stuff.
|
||||
//#define Q3SERVER //q3 server stuff.
|
||||
//#define AVAIL_BOTLIB //q3 botlib
|
||||
//#undef BOTLIB_STATIC //should normally be set only in the makefile, and only if AVAIL_BOTLIB is defined above.
|
||||
//#define HEXEN2 //runs hexen2 gamecode, supports hexen2 file formats.
|
||||
//#define HUFFNETWORK //crappy network compression. probably needs reseeding.
|
||||
#define NETPREPARSE //allows for running both nq+qw on the same server (if not, protocol used must match gamecode).
|
||||
//#define SUBSERVERS //Allows the server to fork itself, each acting as an MMO-style server instance of a single 'realm'.
|
||||
////#define HLCLIENT 7 //we can run HL gamecode (not protocol compatible, set to 6 or 7)
|
||||
////#define HLSERVER 140 //we can run HL gamecode (not protocol compatible, set to 138 or 140)
|
||||
//#define HLCLIENT 7 //we can run HL gamecode (not protocol compatible, set to 6 or 7)
|
||||
//#define HLSERVER 140 //we can run HL gamecode (not protocol compatible, set to 138 or 140)
|
||||
//#define SAVEDGAMES //Can save the game.
|
||||
//#define MVD_RECORDING //server can record MVDs.
|
||||
//#define ENGINE_ROUTING //Engine-provided routing logic (possibly threaded)
|
||||
//#define USE_INTERNAL_BULLET //Statically link against bullet physics plugin (instead of using an external plugin)
|
||||
//#define USE_INTERNAL_ODE //Statically link against ode physics plugin (instead of using an external plugin)
|
||||
|
||||
// Networking options
|
||||
//#define NQPROT //act as an nq client/server, with nq gamecode.
|
||||
#define HAVE_PACKET //we can send unreliable messages!
|
||||
//#define HAVE_TCP //we can create/accept TCP connections.
|
||||
//#define HAVE_GNUTLS //on linux
|
||||
//#define HAVE_OPENSSL //on linux. hardlinked, so typically set only via the makefile.
|
||||
//#define HAVE_WINSSPI //on windows
|
||||
//#define FTPSERVER //sv_ftp cvar.
|
||||
//#define WEBCLIENT //uri_get+any internal downloads etc
|
||||
|
@ -130,7 +143,7 @@
|
|||
//#define IRCCONNECT //lame support for routing game packets via irc server. not a good idea.
|
||||
//#define SUPPORT_ICE //Internet Connectivity Establishment, for use by plugins to establish voice or game connections.
|
||||
//#define CL_MASTER //Clientside Server Browser functionality.
|
||||
//#define PACKAGEMANAGER //Allows the user to enable/disable/download packages and plugins.
|
||||
//#define PACKAGEMANAGER //Allows the user to enable/disable/download(with WEBCLIENT) packages and plugins.
|
||||
|
||||
// Audio Drivers
|
||||
//#define AVAIL_OPENAL
|
||||
|
@ -144,6 +157,8 @@
|
|||
|
||||
// Other Audio Options
|
||||
//#define VOICECHAT
|
||||
//#define HAVE_SPEEX //Support the speex codec.
|
||||
//#define HAVE_OPUS //Support the opus codec.
|
||||
//#define HAVE_MEDIA_DECODER //can play cin/roq, more with plugins
|
||||
//#define HAVE_MEDIA_ENCODER //capture/capturedemo work.
|
||||
//#define HAVE_CDPLAYER //includes cd playback. actual cds. named/numbered tracks are supported regardless (though you need to use the 'music' command to play them without this).
|
||||
|
@ -163,11 +178,12 @@
|
|||
// Outdated stuff
|
||||
//#define SVRANKING //legacy server-side ranking system.
|
||||
////#define QTERM //qterm... adds a console command that allows running programs from within quake - bit like xterm.
|
||||
////#define SVCHAT //ancient lame builtin to support NPC-style chat...
|
||||
//#define SVCHAT //ancient lame builtin to support NPC-style chat...
|
||||
////#define SV_MASTER //Support running the server as a master server. Should probably not be used.
|
||||
////#define WEBSERVER //outdated sv_http cvar. new stuff acts via sv_port_tcp instead (which also gives https).
|
||||
////#define QUAKESPYAPI //define this if you want the engine to be usable via gamespy/quakespy, which has been dead for a long time now. forces the client to use a single port for all outgoing connections, which hurts reconnects.
|
||||
|
||||
|
||||
#ifdef COMPILE_OPTS
|
||||
//things to configure qclib, which annoyingly doesn't include this file itself
|
||||
-DOMIT_QCC //disable the built-in qcc
|
||||
|
@ -183,5 +199,7 @@
|
|||
#endif
|
||||
-DNO_VORBISFILE //disable static vorbisfile
|
||||
|
||||
|
||||
|
||||
-Os //optimise for size instead of speed. less cpu cache needed means that its sometimes faster anyway.
|
||||
#endif
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
// Later code will disable any features if they're not supported on the current platform, so don't worry about win/lin/mac/android/web/etc here - any such issues should be fixed elsewhere.
|
||||
|
||||
//general rebranding
|
||||
//#define DISTRIBUTION "FTE" //should be kept short. 3 or 4 letters is good, with no spaces.
|
||||
//#define DISTRIBUTION "FTE" //should be kept short. 8 or less letters is good, with no spaces.
|
||||
//#define DISTRIBUTIONLONG "Forethought Entertainment" //think of this as your company name. It isn't shown too often, so can be quite long.
|
||||
//#define FULLENGINENAME "FTE Engine" //nominally user-visible name.
|
||||
//#define ENGINEWEBSITE "http://fte.triptohell.info" //for shameless self-promotion purposes.
|
||||
|
@ -44,18 +44,22 @@
|
|||
#define LOADERTHREAD //worker threads for loading misc stuff. falls back on main thread if not supported.
|
||||
#define AVAIL_DINPUT
|
||||
//#define SIDEVIEWS 4 //enable secondary/reverse views.
|
||||
#define MAX_SPLITS 4u
|
||||
//#define TEXTEDITOR //my funky text editor! its awesome!
|
||||
#define PLUGINS //support for external plugins (like huds or fancy menus or whatever)
|
||||
//#define USE_SQLITE //sql-database-as-file support
|
||||
//#define IPLOG //track player's ip addresses (any decent server will hide ip addresses, so this probably isn't that useful, but nq players expect it)
|
||||
|
||||
//Filesystem formats
|
||||
#define PACKAGE_PK3
|
||||
#define PACKAGE_PK3 //aka zips. we support utf8,zip64,spans,weakcrypto,(deflate),(bzip2),symlinks. we do not support strongcrypto nor any of the other compression schemes.
|
||||
//#define PACKAGE_Q1PAK //also q2
|
||||
//#define PACKAGE_DOOMWAD //doom wad support (generates various file names, and adds support for doom's audio, sprites, etc)
|
||||
//#define PACKAGE_VPK //hl2 packages
|
||||
//#define AVAIL_XZDEC //.xz decompression
|
||||
#define AVAIL_GZDEC //.gz decompression
|
||||
#define AVAIL_ZLIB //whether pk3s can be compressed or not.
|
||||
//#define AVAIL_DZIP //.dzip support for smaller demos (which are actually more like pak files and can store ANY type of file)
|
||||
//#define AVAIL_BZLIB //whether pk3s can use bz2 compression
|
||||
//#define PACKAGE_DZIP //.dzip support for smaller demos (which are actually more like pak files and can store ANY type of file)
|
||||
|
||||
//Map formats
|
||||
#define Q1BSPS //Quake1
|
||||
|
@ -84,10 +88,14 @@
|
|||
//Image formats
|
||||
#define IMAGEFMT_KTX //Khronos TeXture. common on gles3 devices for etc2 compression
|
||||
//#define IMAGEFMT_PKM //file format generally written by etcpack or android's etc1tool. doesn't support mips.
|
||||
//#define IMAGEFMT_PBM //pbm/ppm/pgm/pfm family formats.
|
||||
//#define IMAGEFMT_PSD //baselayer only.
|
||||
//#define IMAGEFMT_HDR //an RGBE format.
|
||||
#define IMAGEFMT_DDS //.dds files embed mipmaps and texture compression. faster to load.
|
||||
//#define IMAGEFMT_BLP //legacy crap
|
||||
//#define IMAGEFMT_BMP //windows bmp. yuck.
|
||||
//#define IMAGEFMT_BMP //windows bmp. yuck. also includes .ico for the luls
|
||||
//#define IMAGEFMT_PCX //paletted junk. required for qw player skins, q2 and a few old skyboxes.
|
||||
#define IMAGEFMT_VTF //hl2 image format
|
||||
#define AVAIL_PNGLIB //.png image format support (read+screenshots)
|
||||
//#define AVAIL_JPEGLIB //.jpeg image format support (read+screenshots)
|
||||
//#define PACKAGE_TEXWAD //quake's image wad support
|
||||
|
@ -99,6 +107,7 @@
|
|||
// Game/Gamecode Support
|
||||
#define CSQC_DAT
|
||||
#define MENU_DAT
|
||||
//#define MENU_NATIVECODE //Use an external dll for menus.
|
||||
//#define VM_Q1 //q1qvm implementation, to support ktx.
|
||||
//#define VM_LUA //optionally supports lua instead of ssqc.
|
||||
//#define Q2SERVER //q2 server+gamecode.
|
||||
|
@ -106,6 +115,7 @@
|
|||
//#define Q3CLIENT //q3 client stuff.
|
||||
//#define Q3SERVER //q3 server stuff.
|
||||
//#define AVAIL_BOTLIB //q3 botlib
|
||||
//#undef BOTLIB_STATIC //should normally be set only in the makefile, and only if AVAIL_BOTLIB is defined above.
|
||||
//#define HEXEN2 //runs hexen2 gamecode, supports hexen2 file formats.
|
||||
//#define HUFFNETWORK //crappy network compression. probably needs reseeding.
|
||||
//#define NETPREPARSE //allows for running both nq+qw on the same server (if not, protocol used must match gamecode).
|
||||
|
@ -114,12 +124,16 @@
|
|||
//#define HLSERVER 140 //we can run HL gamecode (not protocol compatible, set to 138 or 140)
|
||||
#define SAVEDGAMES //Can save the game.
|
||||
#define MVD_RECORDING //server can record MVDs.
|
||||
//#define ENGINE_ROUTING //Engine-provided routing logic (possibly threaded)
|
||||
//#define USE_INTERNAL_BULLET //Statically link against bullet physics plugin (instead of using an external plugin)
|
||||
//#define USE_INTERNAL_ODE //Statically link against ode physics plugin (instead of using an external plugin)
|
||||
|
||||
// Networking options
|
||||
//#define NQPROT //act as an nq client/server, with nq gamecode.
|
||||
#define HAVE_PACKET //we can send unreliable messages!
|
||||
#define HAVE_TCP //we can create/accept TCP connections.
|
||||
#define HAVE_GNUTLS //on linux
|
||||
//#define HAVE_OPENSSL //on linux. hardlinked, so typically set only via the makefile.
|
||||
#define HAVE_WINSSPI //on windows
|
||||
//#define FTPSERVER //sv_ftp cvar.
|
||||
#define WEBCLIENT //uri_get+any internal downloads etc
|
||||
|
@ -127,7 +141,7 @@
|
|||
//#define IRCCONNECT //lame support for routing game packets via irc server. not a good idea.
|
||||
#define SUPPORT_ICE //Internet Connectivity Establishment, for use by plugins to establish voice or game connections.
|
||||
#define CL_MASTER //Clientside Server Browser functionality.
|
||||
//#define PACKAGEMANAGER //Allows the user to enable/disable/download packages and plugins.
|
||||
//#define PACKAGEMANAGER //Allows the user to enable/disable/download(with WEBCLIENT) packages and plugins.
|
||||
|
||||
// Audio Drivers
|
||||
#define AVAIL_OPENAL
|
||||
|
@ -141,6 +155,8 @@
|
|||
|
||||
// Other Audio Options
|
||||
#define VOICECHAT
|
||||
//#define HAVE_SPEEX //Support the speex codec.
|
||||
#define HAVE_OPUS //Support the opus codec.
|
||||
#define HAVE_MEDIA_DECODER //can play cin/roq, more with plugins
|
||||
#define HAVE_MEDIA_ENCODER //capture/capturedemo work.
|
||||
//#define HAVE_CDPLAYER //includes cd playback. actual cds. named/numbered tracks are supported regardless (though you need to use the 'music' command to play them without this).
|
||||
|
@ -181,5 +197,7 @@
|
|||
#endif
|
||||
//-DNO_VORBISFILE //disable static vorbisfile
|
||||
|
||||
|
||||
|
||||
//-Os //optimise for size instead of speed. less cpu cache needed means that its sometimes faster anyway.
|
||||
#endif
|
||||
|
|
|
@ -35,14 +35,12 @@
|
|||
#define VKQUAKE
|
||||
#endif
|
||||
|
||||
#define USEEFX
|
||||
#define PLUGINS
|
||||
#define QUAKETC
|
||||
#define AVAIL_OPENAL
|
||||
#define AVAIL_ZLIB
|
||||
#define AVAIL_OGGVORBIS
|
||||
#define IMAGEFMT_PCX
|
||||
#define NOMEDIA
|
||||
#define CL_MASTER
|
||||
#define CSQC_DAT
|
||||
#define MENU_DAT
|
||||
|
@ -56,7 +54,6 @@
|
|||
#define DECOMPRESS_ETC2
|
||||
#define DECOMPRESS_RGTC
|
||||
#define DECOMPRESS_S3TC
|
||||
#define USE_VORBISFILE
|
||||
#define NOBUILTINMENUS
|
||||
#define NOLEGACY
|
||||
#define AVAIL_DINPUT
|
||||
|
@ -89,6 +86,7 @@
|
|||
|
||||
// What do we NOT want to use
|
||||
#undef USE_INTERNAL_BULLET
|
||||
#undef USE_INTERNAL_ODE
|
||||
#undef PACKAGE_DOOMWAD
|
||||
#undef PACKAGE_VPK
|
||||
#undef DOOMWADS
|
||||
|
@ -114,9 +112,9 @@
|
|||
#undef AVAIL_DSOUND
|
||||
#undef BOTLIB_STATIC //q3 botlib
|
||||
#undef AVAIL_XZDEC //.xz decompression
|
||||
#undef AVAIL_SPEEX //.xz decompression
|
||||
#undef HAVE_SPEEX //.xz decompression
|
||||
#undef AVAIL_GZDEC //.gz decompression
|
||||
#undef AVAIL_DZIP //.dzip special-case archive support
|
||||
#undef PACKAGE_DZIP //.dzip special-case archive support
|
||||
#undef AVAIL_PNGLIB //.png image format support (read+screenshots)
|
||||
#undef AVAIL_JPEGLIB //.jpeg image format support (read+screenshots)
|
||||
#undef AVAIL_MP3_ACM //.mp3 support (in windows).
|
||||
|
@ -124,7 +122,6 @@
|
|||
#undef IMAGEFMT_PKM
|
||||
#undef IMAGEFMT_BLP //legacy crap
|
||||
#undef IMAGEFMT_VTF //legacy crap
|
||||
//#undef IMAGEFMT_PCX //legacy crap
|
||||
#undef NETPREPARSE //allows for running both nq+qw on the same server (if not, protocol used must match gamecode).
|
||||
#undef USE_SQLITE //sql-database-as-file support
|
||||
#undef QUAKESTATS //defines STAT_HEALTH etc. if omitted, you'll need to provide that functionality yourself.
|
||||
|
@ -141,7 +138,7 @@
|
|||
#undef Q3SERVER //q3 server stuff.
|
||||
#undef HEXEN2 //runs hexen2 gamecode, supports hexen2 file formats.
|
||||
#undef NQPROT //act as an nq client/server, with nq gamecode.
|
||||
#undef WEBSERVER //sv_ftp + sv_http cvars.
|
||||
////#undef WEBSERVER //sv_ftp + sv_http cvars.
|
||||
#undef WEBCLIENT //uri_get+any internal downloads etc
|
||||
#undef RUNTIMELIGHTING //automatic generation of .lit files
|
||||
#undef R_XFLIP //old silly thing
|
||||
|
@ -150,17 +147,17 @@
|
|||
#undef IRCCONNECT //lame support for routing game packets via irc server. not a good idea.
|
||||
#undef PSET_CLASSIC //support the 'classic' particle system, for that classic quake feel.
|
||||
#undef HAVE_CDPLAYER //includes cd playback. actual cds. named/numbered tracks are supported regardless (though you need to use the 'music' command to play them without this).
|
||||
#undef QTERM
|
||||
////#undef QTERM
|
||||
#undef SIDEVIEWS
|
||||
#undef MAX_SPLITS
|
||||
#undef SUBSERVERS
|
||||
#undef SV_MASTER
|
||||
////#undef SV_MASTER
|
||||
#undef HAVE_MIXER //openal only
|
||||
#undef VM_LUA
|
||||
#undef HLCLIENT
|
||||
#undef HLSERVER
|
||||
#undef FTPSERVER
|
||||
//undef CLIENTONLY //leave this up to the makefiles.
|
||||
//#undef CLIENTONLY //leave this up to the makefiles.
|
||||
#undef HAVE_GNUTLS //linux tls/dtls support
|
||||
#undef HAVE_WINSSPI //windows tls/dtls support
|
||||
#undef HAVE_JUKEBOX //includes built-in jukebox crap
|
||||
|
@ -174,6 +171,16 @@
|
|||
#undef AVAIL_FREETYPE // for truetype font rendering
|
||||
#undef SERVER_DEMO_PLAYBACK //outdated crap
|
||||
|
||||
//FIXME
|
||||
#define HAVE_OPUS
|
||||
//#define HAVE_OPENSSL
|
||||
//#define IMAGEFMT_HDR
|
||||
//#define IMAGEFMT_PBM
|
||||
//#define IMAGEFMT_PSD
|
||||
//#define IPLOG
|
||||
//#define AVAIL_BOTLIB
|
||||
//#define AVAIL_BZLIB
|
||||
|
||||
#ifdef COMPILE_OPTS
|
||||
//things to configure qclib, which annoyingly doesn't include this file itself
|
||||
-DOMIT_QCC //disable the built-in qcc
|
||||
|
|
|
@ -401,7 +401,7 @@ static qboolean FS_Manifest_ParsePackage(ftemanifest_t *man, int packagetype)
|
|||
|
||||
path = Cmd_Argv(arg++);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
a = Cmd_Argv(arg);
|
||||
if (!strcmp(a, "-"))
|
||||
{
|
||||
|
@ -601,7 +601,7 @@ static qboolean FS_Manifest_ParseTokens(ftemanifest_t *man)
|
|||
}
|
||||
}
|
||||
//FIXME: these should generate package-manager entries.
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!Q_strcasecmp(cmd, "filedependancies") || !Q_strcasecmp(cmd, "archiveddependancies"))
|
||||
FS_Manifest_ParsePackage(man, mdt_installation);
|
||||
else if (!Q_strcasecmp(cmd, "archivedpackage"))
|
||||
|
@ -920,8 +920,9 @@ COM_WriteFile
|
|||
The filename will be prefixed by the current game directory
|
||||
============
|
||||
*/
|
||||
void COM_WriteFile (const char *filename, enum fs_relative fsroot, const void *data, int len)
|
||||
qboolean COM_WriteFile (const char *filename, enum fs_relative fsroot, const void *data, int len)
|
||||
{
|
||||
qboolean success = false;
|
||||
vfsfile_t *vfs;
|
||||
|
||||
Sys_Printf ("COM_WriteFile: %s\n", filename);
|
||||
|
@ -931,13 +932,14 @@ void COM_WriteFile (const char *filename, enum fs_relative fsroot, const void *d
|
|||
if (vfs)
|
||||
{
|
||||
VFS_WRITE(vfs, data, len);
|
||||
VFS_CLOSE(vfs);
|
||||
success = VFS_CLOSE(vfs);
|
||||
|
||||
if (fsroot >= FS_GAME)
|
||||
FS_FlushFSHashWritten(filename);
|
||||
else
|
||||
com_fschanged=true;
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -3067,7 +3069,7 @@ void COM_Gamedir (const char *dir, const struct gamepacks *packagespaths)
|
|||
FS_ChangeGame(man, cfg_reload_on_gamedir.ival, false);
|
||||
}
|
||||
|
||||
#if defined(NOLEGACY) || !defined(HAVE_CLIENT)
|
||||
#if !defined(HAVE_LEGACY) || !defined(HAVE_CLIENT)
|
||||
#define ZFIXHACK
|
||||
#elif defined(ANDROID) //on android, these numbers seem to be generating major weirdness, so disable these.
|
||||
#define ZFIXHACK
|
||||
|
@ -3143,7 +3145,7 @@ const gamemode_info_t gamemode_info[] = {
|
|||
//mission packs should generally come after the main game to avoid prefering the main game. we violate this for hexen2 as the mission pack is mostly a superset.
|
||||
//whereas the quake mission packs replace start.bsp making the original episodes unreachable.
|
||||
//for quake, we also allow extracting all files from paks. some people think it loads faster that way or something.
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//cmdline switch exename protocol name(dpmaster) identifying file exec dir1 dir2 dir3 dir(fte) full name
|
||||
//standard quake
|
||||
{"-quake", "q1", "FTE-Quake DarkPlaces-Quake",{"id1/pak0.pak", "id1/quake.rc"},QCFG,{"id1", "qw", "*fte"}, "Quake", "https://triptohell.info/downloadables.php" /*,"id1/pak0.pak|http://quakeservers.nquake.com/qsw106.zip|http://nquake.localghost.net/qsw106.zip|http://qw.quakephil.com/nquake/qsw106.zip|http://fnu.nquake.com/qsw106.zip"*/},
|
||||
|
|
|
@ -7972,7 +7972,7 @@ static void QDECL SV_Tcpport_Callback(struct cvar_s *var, char *oldvalue)
|
|||
FTENET_AddToCollection(svs.sockets, var->name, var->string, NA_IP, NP_STREAM);
|
||||
}
|
||||
cvar_t sv_port_tcp = CVARFC("sv_port_tcp", "", CVAR_SERVERINFO, SV_Tcpport_Callback);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
cvar_t qtv_streamport = CVARAFCD( "qtv_streamport", "",
|
||||
"mvd_streamport", 0, SV_Tcpport_Callback, "Legacy cvar. Use sv_port_tcp instead.");
|
||||
#endif
|
||||
|
@ -8046,7 +8046,7 @@ void SVNET_RegisterCvars(void)
|
|||
#if defined(TCPCONNECT) && defined(HAVE_IPV4)
|
||||
Cvar_Register (&sv_port_tcp, "networking");
|
||||
sv_port_tcp.restriction = RESTRICT_MAX;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register (&qtv_streamport, "networking");
|
||||
qtv_streamport.restriction = RESTRICT_MAX;
|
||||
#endif
|
||||
|
@ -8117,7 +8117,7 @@ void NET_InitServer(void)
|
|||
#endif
|
||||
#if defined(TCPCONNECT) && defined(HAVE_TCP)
|
||||
Cvar_ForceCallback(&sv_port_tcp);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_ForceCallback(&qtv_streamport);
|
||||
#endif
|
||||
#ifdef HAVE_IPV6
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
#include <xtl.h>
|
||||
#include <WinSockX.h>
|
||||
#else
|
||||
#if defined(_MSC_VER) && !defined(NOLEGACY)
|
||||
#if defined(_MSC_VER) && defined(HAVE_LEGACY)
|
||||
#define HAVE_IPX
|
||||
#endif
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
@ -153,7 +153,7 @@
|
|||
#define HAVE_IPV6
|
||||
#endif
|
||||
|
||||
// #if defined(AF_IPX) && !defined(NOLEGACY)
|
||||
// #if defined(AF_IPX) && defined(HAVE_LEGACY)
|
||||
// #include <netipx/ipx.h>
|
||||
// #define HAVE_IPX
|
||||
// #endif
|
||||
|
|
|
@ -19,7 +19,7 @@ cvar_t sv_gameplayfix_nolinknonsolid = CVARD("sv_gameplayfix_nolinknonsolid", "1
|
|||
cvar_t sv_gameplayfix_blowupfallenzombies = CVARD("sv_gameplayfix_blowupfallenzombies", "0", "Allow findradius to find non-solid entities. This may break certain mods. It is better for mods to use FL_FINDABLE_NONSOLID instead.");
|
||||
cvar_t sv_gameplayfix_droptofloorstartsolid = CVARD("sv_gameplayfix_droptofloorstartsolid", "0", "When droptofloor fails, this causes a second attemp, but with traceline instead.");
|
||||
cvar_t dpcompat_findradiusarealinks = CVARD("dpcompat_findradiusarealinks", "0", "Use the world collision info to accelerate findradius instead of looping through every single entity. May actually be slower for large radiuses, or fail to find entities which have not been linked properly with setorigin.");
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
cvar_t dpcompat_strcat_limit = CVARD("dpcompat_strcat_limit", "", "When set, cripples strcat (and related function) string lengths to the value specified.\nSet to 16383 to replicate DP's limit, otherwise leave as 0 to avoid limits.");
|
||||
#endif
|
||||
cvar_t pr_autocreatecvars = CVARD("pr_autocreatecvars", "1", "Implicitly create any cvars that don't exist when read.");
|
||||
|
@ -76,7 +76,7 @@ void PF_Common_RegisterCvars(void)
|
|||
Cvar_Register (&sv_gameplayfix_nolinknonsolid, cvargroup_progs);
|
||||
Cvar_Register (&sv_gameplayfix_droptofloorstartsolid, cvargroup_progs);
|
||||
Cvar_Register (&dpcompat_findradiusarealinks, cvargroup_progs);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register (&dpcompat_strcat_limit, cvargroup_progs);
|
||||
#endif
|
||||
Cvar_Register (&pr_droptofloorunits, cvargroup_progs);
|
||||
|
@ -3655,7 +3655,7 @@ void QCBUILTIN PF_strcat (pubprogfuncs_t *prinst, struct globalvars_s *pr_global
|
|||
l[i] = strlen(s[i]);
|
||||
len += l[i];
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (dpcompat_strcat_limit.ival && len > dpcompat_strcat_limit.ival)
|
||||
{
|
||||
l[i]-= len-dpcompat_strcat_limit.ival;
|
||||
|
@ -5255,7 +5255,7 @@ void QCBUILTIN PF_crossproduct (pubprogfuncs_t *prinst, struct globalvars_s *pr_
|
|||
//Maths functions
|
||||
////////////////////////////////////////////////////
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
unsigned int FTEToDPContents(unsigned int contents)
|
||||
{
|
||||
unsigned int r = 0;
|
||||
|
@ -6245,11 +6245,11 @@ void QCBUILTIN PF_getentityfieldstring (pubprogfuncs_t *prinst, struct globalvar
|
|||
G_INT(OFS_RETURN) = 0;
|
||||
if (fidx < count)
|
||||
{
|
||||
#if !defined(CLIENTONLY) && !defined(NOLEGACY)
|
||||
#if !defined(CLIENTONLY) && defined(HAVE_LEGACY)
|
||||
qboolean isserver = (prinst == sv.world.progs);
|
||||
#endif
|
||||
eval = (eval_t *)&((float *)ent->v)[fdef[fidx].ofs];
|
||||
#ifndef NOLEGACY //extra code to be lazy so that xonotic doesn't go crazy and spam the fuck out of e
|
||||
#ifdef HAVE_LEGACY //extra code to be lazy so that xonotic doesn't go crazy and spam the fuck out of e
|
||||
if ((fdef->type & 0xff) == ev_vector)
|
||||
{
|
||||
if (eval->_vector[0]==0&&eval->_vector[1]==0&&eval->_vector[2]==0)
|
||||
|
@ -6832,7 +6832,7 @@ lh_extension_t QSG_Extensions[] = {
|
|||
#ifdef PSET_SCRIPT
|
||||
{"FTE_PART_SCRIPT", 0, NULL, {NULL}, "Specifies that the r_particledesc cvar can be used to select a list of particle effects to load from particles/*.cfg, the format of which is documented elsewhere."},
|
||||
{"FTE_PART_NAMESPACES", 0, NULL, {NULL}, "Specifies that the engine can use foo.bar to load effect foo from particle description bar. When used via ssqc, this should cause the client to download whatever effects as needed."},
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
{"FTE_PART_NAMESPACE_EFFECTINFO", 0, NULL, {NULL}, "Specifies that effectinfo.bar can load effects from effectinfo.txt for DP compatibility."},
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -562,7 +562,7 @@ void PF_WriteString_Internal (int target, const char *str);
|
|||
pbool QDECL ED_CanFree (edict_t *ed);
|
||||
#endif
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
unsigned int FTEToDPContents(unsigned int contents);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ typedef struct q2trace_s
|
|||
#define MOVE_NORMAL 0
|
||||
#define MOVE_NOMONSTERS (1<<0)
|
||||
#define MOVE_MISSILE (1<<1)
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
#define MOVE_WORLDONLY (MOVE_NOMONSTERS|MOVE_MISSILE) //use MOVE_OTHERONLY instead
|
||||
#endif
|
||||
#define MOVE_HITMODEL (1<<2)
|
||||
|
|
|
@ -677,7 +677,7 @@ static shader_t *GL_ChooseSkin(galiasinfo_t *inf, model_t *model, int surfnum, e
|
|||
{
|
||||
//heads don't get skinned, only players (and weaponless players), they do still get recoloured.
|
||||
if (model==cl.model_precache[cl_playerindex]
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
|| model==cl.model_precache_vwep[0]
|
||||
#endif
|
||||
)
|
||||
|
|
|
@ -5615,7 +5615,7 @@ void Mod_LoadSpriteFrameShader(model_t *spr, int frame, int subframe, mspritefra
|
|||
|
||||
if (mod_litsprites_force.ival || strchr(spr->publicname, '!'))
|
||||
litsprite = true;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else
|
||||
{
|
||||
int i;
|
||||
|
|
|
@ -189,7 +189,7 @@ skipwhite:
|
|||
return com_token;
|
||||
}
|
||||
|
||||
static float Com_FloatArgument(const char *shadername, char *arg, size_t arglen)
|
||||
static float Com_FloatArgument(const char *shadername, char *arg, size_t arglen, float def)
|
||||
{
|
||||
const char *var;
|
||||
|
||||
|
@ -207,9 +207,9 @@ static float Com_FloatArgument(const char *shadername, char *arg, size_t arglen)
|
|||
}
|
||||
var++;
|
||||
}
|
||||
return 0; //not present.
|
||||
return def; //not present.
|
||||
}
|
||||
#define Shader_FloatArgument(s,k) (Com_FloatArgument(s->name,k,strlen(k)))
|
||||
#define Shader_FloatArgument(s,k) (Com_FloatArgument(s->name,k,strlen(k),0))
|
||||
|
||||
|
||||
|
||||
|
@ -1412,13 +1412,13 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
|
|||
if (*token == '=' || *token == '!')
|
||||
{
|
||||
len = strlen(token);
|
||||
if (*token == (Com_FloatArgument(name, token+1, len-1)?'!':'='))
|
||||
if (*token == (Com_FloatArgument(name, token+1, len-1, 0)?'!':'='))
|
||||
ignore = true;
|
||||
continue;
|
||||
}
|
||||
else if (ignore)
|
||||
continue;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strncmp(token, "deluxmap", 8))
|
||||
{ //FIXME: remove this some time.
|
||||
token = va("deluxemap%s",token+8);
|
||||
|
@ -1582,6 +1582,79 @@ static qboolean Shader_LoadPermutations(char *name, program_t *prog, char *scrip
|
|||
if (cvarcount != sizeof(cvarnames)/sizeof(cvarnames[0]))
|
||||
cvarcount += Shader_ParseProgramCvar(script+7, &cvarrefs[cvarcount], &cvarnames[cvarcount], &cvartypes[cvarcount], SP_CVAR3F);
|
||||
}
|
||||
else if (!strncmp(script, "!!arg", 5))
|
||||
{ //compat with our vulkan glsl, generate (specialisation) constants from #args
|
||||
char namebuf[MAX_QPATH];
|
||||
char valuebuf[MAX_QPATH];
|
||||
char *out;
|
||||
char *namestart;
|
||||
char *atype;
|
||||
script+=5;
|
||||
if (*script == 'b')
|
||||
{
|
||||
atype = "bool";
|
||||
strcpy(valuebuf, "false");
|
||||
}
|
||||
else if (*script == 'f')
|
||||
{
|
||||
atype = "float";
|
||||
strcpy(valuebuf, "0.0");
|
||||
}
|
||||
else if (*script == 'd')
|
||||
{
|
||||
atype = "double";
|
||||
strcpy(valuebuf, "0.0");
|
||||
}
|
||||
else if (*script == 'i')
|
||||
{
|
||||
atype = "int";
|
||||
strcpy(valuebuf, "0");
|
||||
}
|
||||
else if (*script == 'u')
|
||||
{
|
||||
atype = "uint";
|
||||
strcpy(valuebuf, "0");
|
||||
}
|
||||
else
|
||||
{
|
||||
atype = "float"; //I guess
|
||||
strcpy(valuebuf, "0.0");
|
||||
}
|
||||
while (*script >= 'a' && *script <= 'z')
|
||||
script++;
|
||||
while (*script == ' ' || *script == '\t')
|
||||
script++;
|
||||
namestart = script;
|
||||
while ((*script >= 'A' && *script <= 'Z') || (*script >= 'a' && *script <= 'z') || (*script >= '0' && *script <= '9') || *script == '_')
|
||||
script++;
|
||||
|
||||
if (script-namestart < countof(namebuf))
|
||||
{
|
||||
float def = 0;
|
||||
memcpy(namebuf, namestart, script - namestart);
|
||||
namebuf[script - namestart] = 0;
|
||||
|
||||
while (*script == ' ' || *script == '\t')
|
||||
script++;
|
||||
if (*script == '=')
|
||||
{
|
||||
script++;
|
||||
while (*script == ' ' || *script == '\t')
|
||||
script++;
|
||||
|
||||
out = valuebuf;
|
||||
while (out < com_token+countof(valuebuf)-1 && *script != '\n' && !(script[0] == '/' && script[1] == '/'))
|
||||
*out++ = *script++;
|
||||
*out++ = 0;
|
||||
if (!strcmp(valuebuf, "true"))
|
||||
def = 1;
|
||||
else
|
||||
def = atof(valuebuf);
|
||||
}
|
||||
Com_FloatArgument(name, valuebuf, sizeof(valuebuf), def);
|
||||
Q_strlcatfz(prescript, &offset, sizeof(prescript), "const %s arg_%s = %s(%s);\n", atype, namebuf, atype, valuebuf);
|
||||
}
|
||||
}
|
||||
else if (!strncmp(script, "!!permu", 7))
|
||||
{
|
||||
script += 7;
|
||||
|
|
|
@ -3352,7 +3352,7 @@ static qboolean Sh_DrawStencilLight(dlight_t *dl, vec3_t colour, vec3_t axis[3],
|
|||
|
||||
/*draw the light*/
|
||||
BE_SelectMode(BEM_LIGHT);
|
||||
Sh_DrawEntLighting(dl, colour);
|
||||
Sh_DrawEntLighting(dl, colour, vvis);
|
||||
|
||||
/*okay, no more stencil stuff*/
|
||||
IDirect3DDevice9_SetRenderState(pD3DDev9, D3DRS_STENCILENABLE, false);
|
||||
|
|
|
@ -1378,7 +1378,7 @@ static const char *glsl_hdrs[] =
|
|||
"#define SPECMUL 1.0\n"
|
||||
"#endif\n"
|
||||
"#define FTE_SPECULAR_MULTIPLIER (SPECULAR_BASE_MUL*float(SPECMUL))\n"
|
||||
#if 0//ndef NOLEGACY
|
||||
#if 0//def HAVE_LEGACY
|
||||
"uniform sampler2DShadow s_shadowmap;"
|
||||
"uniform samplerCube s_projectionmap;"
|
||||
"uniform sampler2D s_diffuse;"
|
||||
|
@ -2272,7 +2272,6 @@ static GLhandleARB GLSlang_CreateShader (program_t *prog, const char *name, int
|
|||
|
||||
if (prog)
|
||||
{ //for compat with our vulkan processor, which injects samplers in order to control layouts.
|
||||
#if 1//def NOLEGACY
|
||||
const char *defaultsamplernames[] =
|
||||
{
|
||||
#ifdef SHADOWDBG_COLOURNOTDEPTH
|
||||
|
@ -2312,7 +2311,6 @@ static GLhandleARB GLSlang_CreateShader (program_t *prog, const char *name, int
|
|||
if (prog->defaulttextures & (1u<<i))
|
||||
GLSlang_GenerateInternal(&glsl, defaultsamplernames[i]);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case GL_GEOMETRY_SHADER_ARB:
|
||||
|
|
|
@ -197,7 +197,7 @@ void EGL_Shutdown(void)
|
|||
eglsurf = EGL_NO_SURFACE;
|
||||
}
|
||||
|
||||
static void EGL_ShowConfig(EGLDisplay egldpy, EGLConfig cfg)
|
||||
/*static void EGL_ShowConfig(EGLDisplay egldpy, EGLConfig cfg)
|
||||
{
|
||||
struct
|
||||
{
|
||||
|
@ -243,12 +243,12 @@ static void EGL_ShowConfig(EGLDisplay egldpy, EGLConfig cfg)
|
|||
|
||||
for (i = 0; i < countof(eglattrs); i++)
|
||||
{
|
||||
if (eglGetContifAttrib(egldpy, cfg, eglattrs[i].attr, &val))
|
||||
Con_Printf("%i.%s: %i\n", cfg, eglattrs[i].attrname, val);
|
||||
if (qeglGetContifAttrib(egldpy, cfg, eglattrs[i].attr, &val))
|
||||
Con_DPrintf("%i.%s: %i\n", cfg, eglattrs[i].attrname, val);
|
||||
else
|
||||
Con_Printf("%i.%s: UNKNOWN\n", cfg, eglattrs[i].attrname);
|
||||
Con_DPrintf("%i.%s: UNKNOWN\n", cfg, eglattrs[i].attrname);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
static void EGL_UpdateSwapInterval(void)
|
||||
{
|
||||
|
@ -361,7 +361,7 @@ qboolean EGL_Init (rendererstate_t *info, unsigned char *palette, int eglplat, v
|
|||
return false;
|
||||
}
|
||||
|
||||
EGL_ShowConfig(egldpy, cfg);
|
||||
// EGL_ShowConfig(egldpy, cfg);
|
||||
|
||||
if (qeglCreatePlatformWindowSurface)
|
||||
eglsurf = qeglCreatePlatformWindowSurface(egldpy, cfg, nwindow, info->srgb?wndattrib:NULL);
|
||||
|
|
|
@ -756,7 +756,7 @@ mfog_t *Mod_FogForOrigin(model_t *wmodel, vec3_t org);
|
|||
#define BEF_FORCEADDITIVE (1u<<2) //blend dest = GL_ONE
|
||||
#define BEF_FORCETRANSPARENT (1u<<3) //texenv replace -> modulate
|
||||
#define BEF_FORCENODEPTH (1u<<4) //disables any and all depth.
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
#define BEF_PUSHDEPTH (1u<<5) //additional polygon offset
|
||||
#endif
|
||||
//FIXME: the above should really be legacy-only
|
||||
|
|
|
@ -145,6 +145,10 @@ int COM_CheckParm(const char *parm)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
char *authedusername;
|
||||
char *autheduserpassword;
|
||||
int lport_min, lport_max;
|
||||
|
@ -158,6 +162,8 @@ int main(int argc, char **argv)
|
|||
#ifdef _WIN32
|
||||
WSADATA pointlesscrap;
|
||||
WSAStartup(2, &pointlesscrap);
|
||||
#else
|
||||
signal(SIGPIPE, SIG_IGN); //so we don't crash out if a peer closes the socket half way through.
|
||||
#endif
|
||||
|
||||
while (arg < argc)
|
||||
|
|
|
@ -71,7 +71,7 @@ cvar_t pr_imitatemvdsv = CVARFD("pr_imitatemvdsv", "0", CVAR_LATCH, "Enables mvd
|
|||
/*other stuff*/
|
||||
cvar_t pr_maxedicts = CVARAFD("pr_maxedicts", "32768", "max_edicts", CVAR_LATCH, "Maximum number of entities spawnable on the map at once. Low values will crash the server on some maps/mods. High values will result in excessive memory useage (see pr_ssqc_memsize). Illegible server messages may occur with old/other clients above 32k. FTE's network protocols have a maximum at a little over 4 million. Please don't ever make a mod that actually uses that many...");
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
cvar_t pr_no_playerphysics = CVARFD("pr_no_playerphysics", "1", CVAR_LATCH, "Prevents support of the 'SV_PlayerPhysics' QC function. This allows servers to prevent needless breakage of player prediction.");
|
||||
#else
|
||||
cvar_t pr_no_playerphysics = CVARFD("pr_no_playerphysics", "0", CVAR_LATCH, "Prevents support of the 'SV_PlayerPhysics' QC function. This allows servers to prevent needless breakage of player prediction.");
|
||||
|
@ -89,7 +89,7 @@ cvar_t pr_compatabilitytest = CVARFD("pr_compatabilitytest", "0", CVAR_LATCH, "O
|
|||
cvar_t pr_ssqc_coreonerror = CVAR("pr_coreonerror", "1");
|
||||
|
||||
cvar_t sv_gameplayfix_honest_tracelines = CVAR("sv_gameplayfix_honest_tracelines", "1");
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
cvar_t sv_gameplayfix_setmodelrealbox = CVARD("sv_gameplayfix_setmodelrealbox", "1", "Vanilla setmodel will setsize the entity to a hardcoded size for non-bsp models. This cvar will always use the real size of the model instead, but will require that the server actually loads the model.");
|
||||
#else
|
||||
cvar_t sv_gameplayfix_setmodelrealbox = CVARD("sv_gameplayfix_setmodelrealbox", "0", "Vanilla setmodel will setsize the entity to a hardcoded size for non-bsp models. This cvar will always use the real size of the model instead, but will require that the server actually loads the model.");
|
||||
|
@ -315,7 +315,7 @@ void PDECL ED_Spawned (struct edict_s *ent, int loading)
|
|||
ent->xv->drawflags = SCALE_ORIGIN_ORIGIN; //if not running hexen2, default the scale origin to the actual origin.
|
||||
#endif
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
ent->xv->Version = sv.csqcentversion[ent->entnum];
|
||||
#endif
|
||||
ent->xv->uniquespawnid = sv.csqcentversion[ent->entnum];
|
||||
|
@ -872,7 +872,7 @@ void PR_LoadGlabalStruct(qboolean muted)
|
|||
static float writeonly;
|
||||
static int writeonly_int;
|
||||
static int endcontentsi, surfaceflagsi;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
static float endcontentsf, surfaceflagsf;
|
||||
#endif
|
||||
static float dimension_send_default;
|
||||
|
@ -923,11 +923,11 @@ void PR_LoadGlabalStruct(qboolean muted)
|
|||
globalint (true, trace_ent);
|
||||
globalfloat (false, trace_inopen);
|
||||
globalfloat (false, trace_inwater);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
globalfloat (false, trace_endcontentsf);
|
||||
#endif
|
||||
globalint (false, trace_endcontentsi);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
globalfloat (false, trace_surfaceflagsf);
|
||||
#endif
|
||||
globalint (false, trace_surfaceflagsi);
|
||||
|
@ -937,7 +937,7 @@ void PR_LoadGlabalStruct(qboolean muted)
|
|||
globalint (false, trace_surface_id);
|
||||
globalint (false, trace_bone_id);
|
||||
globalint (false, trace_triangle_id);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
globalstring (false, trace_dphittexturename);
|
||||
globalfloat (false, trace_dpstartcontents);
|
||||
globalfloat (false, trace_dphitcontents);
|
||||
|
@ -980,7 +980,7 @@ void PR_LoadGlabalStruct(qboolean muted)
|
|||
|
||||
#define ensureglobal(name,var) if (!(pr_globals)->name) (pr_globals)->name = &var;
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
if (!(pr_globals)->trace_surfaceflagsi)
|
||||
(pr_globals)->trace_surfaceflagsi = (int*)PR_FindGlobal(svprogfuncs, "trace_surfaceflags", 0, NULL);
|
||||
if (!(pr_globals)->trace_endcontentsi)
|
||||
|
@ -3712,7 +3712,7 @@ static void set_trace_globals(pubprogfuncs_t *prinst, /*struct globalvars_s *pr_
|
|||
pr_global_struct->trace_bone_id = trace->bone_id;
|
||||
pr_global_struct->trace_triangle_id = trace->triangle_id;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
pr_global_struct->trace_surfaceflagsf = trace->surface?trace->surface->flags:0;
|
||||
pr_global_struct->trace_endcontentsf = trace->contents;
|
||||
|
||||
|
@ -4013,7 +4013,7 @@ void PF_stuffcmd_Internal(int entnum, const char *str, unsigned int flags)
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//this block is a hack to 'fix' nq mods that expect all clients to support nq commands - but we're a qw engine.
|
||||
//FIXME: should buffer the entire command instead.
|
||||
if (progstype != PROG_QW)
|
||||
|
@ -4541,7 +4541,7 @@ static void QCBUILTIN PF_getmodelindex (pubprogfuncs_t *prinst, struct globalvar
|
|||
|
||||
G_FLOAT(OFS_RETURN) = PF_precache_model_Internal(prinst, s, queryonly);
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
void QCBUILTIN PF_precache_vwep_model (pubprogfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
int i;
|
||||
|
@ -11251,7 +11251,7 @@ BuiltinList_t BuiltinList[] = { //nq qw h2 ebfs
|
|||
{"setpause", PF_setpause, 0, 0, 0, 531, D("void(float pause)", "Sets whether the server should or should not be paused. This does not affect auto-paused things like when the console is down.")},
|
||||
//end dp extras
|
||||
//begin mvdsv extras
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
{"precache_vwep_model",PF_precache_vwep_model,0,0, 0, 532, "float(string mname)"},
|
||||
#endif
|
||||
//end mvdsv extras
|
||||
|
@ -12756,7 +12756,7 @@ void PR_DumpPlatform_f(void)
|
|||
VFS_PRINTF(f, "#pragma warning %s Q105 /*too few parms. The vanilla qcc didn't validate properly, hence why fteqcc normally treats it as a warning.*/\n", (targ & ID1)?"enable":"error");
|
||||
VFS_PRINTF(f, "#pragma warning %s Q106 /*assignment to constant/lvalue. Define them as var if you want to initialise something.*/\n", (targ & ID1)?"enable":"error");
|
||||
VFS_PRINTF(f, "#pragma warning error Q208 /*system crc unknown. Compatibility goes out of the window if you disable this.*/\n");
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
VFS_PRINTF(f, "#pragma warning error F211 /*system crc outdated (eg: dp's csqc). Such mods will not run properly in FTE.*/\n");
|
||||
#else
|
||||
VFS_PRINTF(f, "#pragma warning disable F211 /*system crc outdated (eg: dp's csqc). Note that this may trigger emulation.*/\n");
|
||||
|
|
|
@ -60,12 +60,12 @@ typedef struct nqglobalvars_s
|
|||
float *trace_allsolid;
|
||||
float *trace_startsolid;
|
||||
float *trace_fraction;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
float *trace_surfaceflagsf;
|
||||
#endif
|
||||
int *trace_surfaceflagsi;
|
||||
string_t*trace_surfacename;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
float *trace_endcontentsf;
|
||||
#endif
|
||||
int *trace_endcontentsi;
|
||||
|
@ -80,7 +80,7 @@ typedef struct nqglobalvars_s
|
|||
int *trace_ent;
|
||||
float *trace_inopen;
|
||||
float *trace_inwater;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
string_t*trace_dphittexturename;
|
||||
float *trace_dpstartcontents;
|
||||
float *trace_dphitcontents;
|
||||
|
@ -117,7 +117,7 @@ typedef struct nqglobalvars_s
|
|||
#define P_VEC(v) (pr_global_struct->v)
|
||||
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
#define comfieldfloat_legacy(n,desc)
|
||||
#else
|
||||
#define comfieldfloat_legacy comfieldfloat
|
||||
|
|
|
@ -121,7 +121,7 @@ pbool PDECL SV_ExtendedSaveData(pubprogfuncs_t *progfuncs, void *loadctx, const
|
|||
l = COM_ParseTokenOut(l, NULL, token, sizeof(token), &tt);if (tt != TTP_STRING)return false;
|
||||
sv.strings.model_precache[idx] = PR_AddString(svprogfuncs, token, 0, false);
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!strcmp(token, "vwep"))
|
||||
{ //vwep N "MODELNAME"
|
||||
//0 IS valid, and frankly this stuff sucks.
|
||||
|
@ -1322,7 +1322,7 @@ void SV_SaveLevelCache(const char *savedir, qboolean dontharmgame)
|
|||
for (i=1 ; i<MAX_SSPARTICLESPRE ; i++)
|
||||
if (sv.strings.particle_precache[i] && *sv.strings.particle_precache[i])
|
||||
VFS_PRINTF (f, "particle %i %s\n", i, COM_QuotedString(sv.strings.particle_precache[i], buf, sizeof(buf), false));
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
for (i = 0; i < sizeof(sv.strings.vw_model_precache)/sizeof(sv.strings.vw_model_precache[0]); i++)
|
||||
if (sv.strings.vw_model_precache[i])
|
||||
VFS_PRINTF (f, "vwep %i %s\n", i, COM_QuotedString(sv.strings.vw_model_precache[i], buf, sizeof(buf), false));
|
||||
|
|
|
@ -152,7 +152,7 @@ typedef struct
|
|||
};
|
||||
#endif
|
||||
struct {
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
const char *vw_model_precache[32];
|
||||
#endif
|
||||
const char *model_precache[MAX_PRECACHE_MODELS]; // NULL terminated
|
||||
|
@ -415,7 +415,7 @@ enum
|
|||
PRESPAWN_CSPROGS, //demos contain a copy of the csprogs.
|
||||
#endif
|
||||
PRESPAWN_SOUNDLIST, //nq skips these
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
PRESPAWN_VWEPMODELLIST, //qw ugly extension.
|
||||
#endif
|
||||
PRESPAWN_MODELLIST,
|
||||
|
@ -503,7 +503,7 @@ typedef struct client_s
|
|||
// extracted from userinfo
|
||||
char guid[64]; /*+2 for split+pad*/
|
||||
int messagelevel; // for filtering printed messages
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
float *dp_ping;
|
||||
float *dp_pl;
|
||||
#endif
|
||||
|
@ -562,7 +562,7 @@ typedef struct client_s
|
|||
#define SENDFLAGS_PRESENT 0x80000000u //this entity is present on that client
|
||||
#define SENDFLAGS_REMOVED 0x40000000u //to handle remove packetloss
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
char *dlqueue; //name\name delimited list of files to ask the client to download.
|
||||
#endif
|
||||
char downloadfn[MAX_QPATH];
|
||||
|
@ -1320,7 +1320,7 @@ void SV_UpdateToReliableMessages (void);
|
|||
void SV_FlushBroadcasts (void);
|
||||
qboolean SV_CanTrack(client_t *client, int entity);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
void SV_DownloadQueueNext(client_t *client);
|
||||
void SV_DownloadQueueClear(client_t *client);
|
||||
#endif
|
||||
|
|
|
@ -2980,7 +2980,7 @@ void SV_PrecacheList_f(void)
|
|||
{
|
||||
unsigned int i;
|
||||
char *group = Cmd_Argv(1);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!*group || !strncmp(group, "vwep", 4))
|
||||
{
|
||||
for (i = 0; i < sizeof(sv.strings.vw_model_precache)/sizeof(sv.strings.vw_model_precache[0]); i++)
|
||||
|
@ -3172,6 +3172,7 @@ void SV_InitOperatorCommands (void)
|
|||
Cmd_AddCommandD ("map_restart", SV_Map_f, NULL); //from q3.
|
||||
Cmd_AddCommand ("listmaps", SV_MapList_f);
|
||||
Cmd_AddCommand ("maplist", SV_MapList_f);
|
||||
Cmd_AddCommand ("maps", SV_MapList_f);
|
||||
|
||||
Cmd_AddCommand ("heartbeat", SV_Heartbeat_f);
|
||||
|
||||
|
|
|
@ -4142,7 +4142,7 @@ void SV_CleanupEnts(void)
|
|||
ent = EDICT_NUM_PB(svprogfuncs, e);
|
||||
ent->xv->SendFlags = 0;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//this is legacy code. we'll just have to live with the slight delay.
|
||||
//FIXME: check if Version exists and do it earlier.
|
||||
if ((int)ent->xv->Version != sv.csqcentversion[ent->entnum])
|
||||
|
|
|
@ -1693,7 +1693,7 @@ void SV_SpawnServer (const char *server, const char *startspot, qboolean noents,
|
|||
SV_ExtractFromUserinfo(host_client, true);
|
||||
SV_SpawnParmsToQC(host_client);
|
||||
SV_SetUpClientEdict(host_client, sv_player);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
sv_player->xv->clientcolors = host_client->playercolor;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -622,7 +622,7 @@ void SV_DropClient (client_t *drop)
|
|||
Con_TPrintf ("Client \"%s\" removed\n",drop->name);
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueClear(drop);
|
||||
#endif
|
||||
if (drop->download)
|
||||
|
@ -5707,7 +5707,7 @@ void SV_ExtractFromUserinfo (client_t *cl, qboolean verbose)
|
|||
cl->playercolor = top*16 + bottom;
|
||||
if (svs.gametype == GT_PROGS || svs.gametype == GT_Q1QVM)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (cl->edict)
|
||||
cl->edict->xv->clientcolors = cl->playercolor;
|
||||
#endif
|
||||
|
|
|
@ -58,7 +58,7 @@ cvar_t sv_gameplayfix_noairborncorpse = CVAR( "sv_gameplayfix_noairborncorpse",
|
|||
cvar_t sv_gameplayfix_multiplethinks = CVARD( "sv_gameplayfix_multiplethinks", "1", "Enables multiple thinks per entity per frame so small nextthink times are accurate. QuakeWorld mods expect a value of 1, while NQ expects 0.");
|
||||
cvar_t sv_gameplayfix_stepdown = CVARD( "sv_gameplayfix_stepdown", "0", "Attempt to step down steps, instead of only up them. Affects non-predicted movetype_walk.");
|
||||
cvar_t sv_gameplayfix_bouncedownslopes = CVARD( "sv_gameplayfix_grenadebouncedownslopes", "0", "MOVETYPE_BOUNCE speeds are calculated relative to the impacted surface, instead of the vertical, reducing the chance of grenades just sitting there on slopes.");
|
||||
#if !defined(CLIENTONLY) && defined(NQPROT) && !defined(NOLEGACY)
|
||||
#if !defined(CLIENTONLY) && defined(NQPROT) && defined(HAVE_LEGACY)
|
||||
cvar_t sv_gameplayfix_spawnbeforethinks = CVARD( "sv_gameplayfix_spawnbeforethinks", "0", "Fixes an issue where player thinks (including Pre+Post) can be called before PutClientInServer. Unfortunately at least one mod depends upon PreThink being called first in order to correctly determine spawn positions.");
|
||||
#endif
|
||||
cvar_t dpcompat_noretouchground = CVARD( "dpcompat_noretouchground", "0", "Prevents entities that are already standing on an entity from touching the same entity again.");
|
||||
|
@ -102,7 +102,7 @@ void WPhys_Init(void)
|
|||
Cvar_Register (&sv_gameplayfix_bouncedownslopes, cvargroup_serverphysics);
|
||||
Cvar_Register (&dpcompat_noretouchground, cvargroup_serverphysics);
|
||||
|
||||
#if !defined(CLIENTONLY) && defined(NQPROT) && !defined(NOLEGACY)
|
||||
#if !defined(CLIENTONLY) && defined(NQPROT) && defined(HAVE_LEGACY)
|
||||
Cvar_Register (&sv_gameplayfix_spawnbeforethinks, cvargroup_serverphysics);
|
||||
#endif
|
||||
}
|
||||
|
@ -2105,7 +2105,7 @@ void WPhys_RunEntity (world_t *w, wedict_t *ent)
|
|||
{ //a client woo.
|
||||
qboolean readyforjump = false;
|
||||
|
||||
#if defined(NQPROT) && !defined(NOLEGACY)
|
||||
#if defined(NQPROT) && defined(HAVE_LEGACY)
|
||||
if (svs.clients[ent->entnum-1].state == cs_connected)
|
||||
{ //nq is buggy and calls playerprethink/etc while the player is still connecting.
|
||||
//some mods depend on this, hopefully unintentionally (as is the case with Arcane Dimensions).
|
||||
|
|
|
@ -2907,7 +2907,7 @@ void SV_UpdateToReliableMessages (void)
|
|||
{
|
||||
if ((svs.gametype == GT_Q1QVM || svs.gametype == GT_PROGS) && host_client->state == cs_spawned)
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
//DP_SV_CLIENTCOLORS
|
||||
if (host_client->edict->xv->clientcolors != host_client->playercolor)
|
||||
{
|
||||
|
|
|
@ -78,7 +78,7 @@ cvar_t cmd_gamecodelevel = CVAR("cmd_gamecodelevel", STRINGIFY(RESTRICT_LOCAL));
|
|||
cvar_t sv_pure = CVARFD("sv_pure", "", CVAR_SERVERINFO, "The most evil cvar in the world, many clients will ignore this.\n0=standard quake rules.\n1=clients should prefer files within packages present on the server.\n2=clients should use *only* files within packages present on the server.\nDue to quake 1.01/1.06 differences, a setting of 2 only works in total conversions.");
|
||||
cvar_t sv_nqplayerphysics = CVARAFCD("sv_nqplayerphysics", "0", "sv_nomsec", 0, SV_NQPhysicsUpdate, "Disable player prediction and run NQ-style player physics instead. This can be used for compatibility with mods that expect exact behaviour.");
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
cvar_t sv_brokenmovetypes = CVARD("sv_brokenmovetypes", "0", "Emulate vanilla quakeworld by forcing MOVETYPE_WALK on all players. Shouldn't be used for any games other than QuakeWorld.");
|
||||
#endif
|
||||
|
||||
|
@ -653,7 +653,7 @@ void SVNQ_New_f (void)
|
|||
if (!gamedir[0])
|
||||
{
|
||||
gamedir = FS_GetGamedir(true);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!strcmp(gamedir, "qw")) //hack: hide the qw dir from nq clients.
|
||||
gamedir = "";
|
||||
#endif
|
||||
|
@ -1243,7 +1243,7 @@ void SV_SendClientPrespawnInfo(client_t *client)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (client->prespawn_stage == PRESPAWN_VWEPMODELLIST)
|
||||
{
|
||||
//no indicies. the protocol can't cope with them.
|
||||
|
@ -2006,7 +2006,7 @@ void SV_Begin_Core(client_t *split)
|
|||
}
|
||||
else
|
||||
{
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
split->edict->xv->clientcolors = split->playercolor;
|
||||
if (progstype != PROG_QW)
|
||||
{ //some redundant things, purely for dp compat
|
||||
|
@ -2153,7 +2153,7 @@ void SV_Begin_Core(client_t *split)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
split->dp_ping = NULL;
|
||||
split->dp_pl = NULL;
|
||||
if (progstype == PROG_NQ)
|
||||
|
@ -2462,7 +2462,7 @@ static void SV_NextChunkedDownload(unsigned int chunknum, int ezpercent, int ezf
|
|||
|
||||
host_client->downloadstarted = false;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueNext(host_client);
|
||||
#endif
|
||||
}
|
||||
|
@ -2544,7 +2544,7 @@ void SV_NextDownload_f (void)
|
|||
VFS_CLOSE (host_client->download);
|
||||
host_client->download = NULL;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueNext(host_client);
|
||||
#endif
|
||||
}
|
||||
|
@ -3304,7 +3304,7 @@ void SV_DownloadSize_f(void)
|
|||
|
||||
#ifdef MVD_RECORDING
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
void SV_DownloadQueueAdd(client_t *client, const char *name)
|
||||
{
|
||||
if (!client->dlqueue)
|
||||
|
@ -3370,7 +3370,7 @@ void SV_DemoDownload_f(void)
|
|||
host_client->download = NULL;
|
||||
host_client->downloadstarted = false;
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueClear(host_client);
|
||||
#endif
|
||||
return;
|
||||
|
@ -3405,7 +3405,7 @@ void SV_DemoDownload_f(void)
|
|||
|
||||
if (!mvdname)
|
||||
SV_ClientPrintf (host_client, PRINT_HIGH, "%s is an invalid MVD demonum.\n", name);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (!(host_client->protocol & PEXT_CHUNKEDDOWNLOADS) || !strncmp(InfoBuf_ValueForKey(&host_client->userinfo, "*client"), "ezQuake", 7))
|
||||
{ //chunked downloads was built around the client being in control (because only it knows which files are needed)
|
||||
//but ezquake never implemented that part
|
||||
|
@ -3420,7 +3420,7 @@ void SV_DemoDownload_f(void)
|
|||
ClientReliableWrite_String (host_client, s);
|
||||
}
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!host_client->download)
|
||||
SV_DownloadQueueNext(host_client);
|
||||
#endif
|
||||
|
@ -3592,7 +3592,7 @@ void SV_BeginDownload_f(void)
|
|||
}
|
||||
if (ISNQCLIENT(host_client))
|
||||
host_client->send_message = true;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueNext(host_client);
|
||||
#endif
|
||||
return;
|
||||
|
@ -3670,7 +3670,7 @@ void SV_StopDownload_f(void)
|
|||
|
||||
host_client->downloadstarted = false;
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
SV_DownloadQueueNext(host_client);
|
||||
// SV_DownloadQueueClear(host_client);
|
||||
#endif
|
||||
|
@ -4524,7 +4524,7 @@ void SV_SetInfo_f (void)
|
|||
{ //team fortress has a nasty habit of booting people without this
|
||||
sv_player->v->team = atoi(Cmd_Argv(2))+1;
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (progstype != PROG_QW && !strcmp(key, "model"))
|
||||
{
|
||||
eval_t *eval = svprogfuncs->GetEdictFieldValue(svprogfuncs, sv_player, "playermodel", ev_string, NULL);
|
||||
|
@ -5129,7 +5129,7 @@ void SV_SetUpClientEdict (client_t *cl, edict_t *ent)
|
|||
|
||||
ent->v->colormap = NUM_FOR_EDICT(svprogfuncs, ent);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
{
|
||||
extern int pr_teamfield;
|
||||
if (pr_teamfield)
|
||||
|
@ -6867,7 +6867,7 @@ int SV_PMTypeForClient (client_t *cl, edict_t *ent)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (sv_brokenmovetypes.value) //this is to mimic standard qw servers, which don't support movetypes other than MOVETYPE_FLY.
|
||||
{ //it prevents bugs from being visible in unsuspecting mods.
|
||||
if (cl && cl->spectator)
|
||||
|
@ -6905,7 +6905,7 @@ int SV_PMTypeForClient (client_t *cl, edict_t *ent)
|
|||
case MOVETYPE_NONE:
|
||||
return PM_NONE;
|
||||
|
||||
#ifdef NOLEGACY
|
||||
#ifndef HAVE_LEGACY
|
||||
case MOVETYPE_TOSS:
|
||||
case MOVETYPE_BOUNCE:
|
||||
return PM_DEAD;
|
||||
|
@ -6913,7 +6913,7 @@ int SV_PMTypeForClient (client_t *cl, edict_t *ent)
|
|||
|
||||
case MOVETYPE_WALK:
|
||||
default:
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (cl && ent->v->health <= 0)
|
||||
return PM_DEAD;
|
||||
#endif
|
||||
|
@ -7740,7 +7740,7 @@ done:
|
|||
else
|
||||
fname = va("CSEv_%s", rname);
|
||||
f = PR_FindFunction(svprogfuncs, fname, PR_ANY);
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if (!f)
|
||||
{
|
||||
if (i)
|
||||
|
@ -8672,7 +8672,7 @@ void SV_UserInit (void)
|
|||
Cvar_Register (&votepercent, sv_votinggroup);
|
||||
Cvar_Register (&votetime, sv_votinggroup);
|
||||
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
Cvar_Register (&sv_brokenmovetypes, "Backwards compatability");
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -2510,7 +2510,7 @@ trace_t World_Move (world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t e
|
|||
|
||||
if (passedict->xv->hitcontentsmaski)
|
||||
clip.hitcontentsmask = passedict->xv->hitcontentsmaski;
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
else if (passedict->xv->dphitcontentsmask)
|
||||
{
|
||||
unsigned int nm=0, fl = passedict->xv->dphitcontentsmask;
|
||||
|
@ -2544,7 +2544,7 @@ trace_t World_Move (world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t e
|
|||
clip.hitcontentsmask = nm;
|
||||
}
|
||||
#endif
|
||||
/*#ifndef NOLEGACY
|
||||
/*#ifdef HAVE_LEGACY
|
||||
else if (passedict->xv->hitcontentsmask)
|
||||
clip.hitcontentsmask = passedict->xv->hitcontentsmask;
|
||||
#endif*/
|
||||
|
@ -2570,7 +2570,7 @@ trace_t World_Move (world_t *w, vec3_t start, vec3_t mins, vec3_t maxs, vec3_t e
|
|||
wedict_t *other = WEDICT_NUM_UB(w->progs, *w->g.other);
|
||||
return World_ClipMoveToEntity (w, other, other->v->origin, other->v->angles, start, mins, maxs, end, hullnum, type & MOVE_HITMODEL, clip.capsule, clip.hitcontentsmask);
|
||||
}
|
||||
#ifndef NOLEGACY
|
||||
#ifdef HAVE_LEGACY
|
||||
if ((type&MOVE_WORLDONLY) == MOVE_WORLDONLY)
|
||||
{ //for compat with DP
|
||||
wedict_t *other = w->edicts;
|
||||
|
|
|
@ -3025,12 +3025,13 @@ static void BE_CreatePipeline(program_t *p, unsigned int shaderflags, unsigned i
|
|||
err = vkCreateGraphicsPipelines(vk.device, vk.pipelinecache, 1, &pipeCreateInfo, vkallocationcb, &pipe->pipeline);
|
||||
|
||||
if (err)
|
||||
{
|
||||
{ //valid err values are VK_ERROR_OUT_OF_HOST_MEMORY, VK_ERROR_OUT_OF_DEVICE_MEMORY, VK_ERROR_INVALID_SHADER_NV
|
||||
//VK_INCOMPLETE is a Qualcom bug with certain spirv-opt optimisations.
|
||||
shaderstate.rc.activepipeline = VK_NULL_HANDLE;
|
||||
if (err != VK_ERROR_INVALID_SHADER_NV)
|
||||
Sys_Error("Error %i creating pipeline for %s. Check spir-v modules / drivers.\n", err, shaderstate.curshader->name);
|
||||
Sys_Error("%s creating pipeline %s for material %s. Check spir-v modules / drivers.\n", VK_VKErrorToString(err), p->name, shaderstate.curshader->name);
|
||||
else
|
||||
Con_Printf("Error creating pipeline for %s. Check glsl / spir-v modules / drivers.\n", shaderstate.curshader->name);
|
||||
Con_Printf("Error creating pipeline %s for material %s. Check glsl / spir-v modules / drivers.\n", p->name, shaderstate.curshader->name);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue