added a macro for specifying all the cvar properties. This will simplify stuff for Q2.
Also added trace_endcontents and trace_surfaceflags. File system (still too selectivly) reads gz files. Fixed a buffer overflow in the http client. Made server downloads decompress zipped files to a temporary file. This should make it download them faster. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1943 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
bc1f25a11b
commit
6430b9b214
57 changed files with 931 additions and 658 deletions
|
@ -31,39 +31,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
void ED_Print (struct progfuncs_s *progfuncs, struct edict_s *ed);
|
||||
int PR_EnableEBFSBuiltin(char *name, int binum);
|
||||
|
||||
cvar_t nomonsters = {"nomonsters", "0"};
|
||||
cvar_t gamecfg = {"gamecfg", "0"};
|
||||
cvar_t scratch1 = {"scratch1", "0"};
|
||||
cvar_t scratch2 = {"scratch2", "0"};
|
||||
cvar_t scratch3 = {"scratch3", "0"};
|
||||
cvar_t scratch4 = {"scratch4", "0"};
|
||||
cvar_t savedgamecfg = {"savedgamecfg", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t saved1 = {"saved1", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t saved2 = {"saved2", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t saved3 = {"saved3", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t saved4 = {"saved4", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t temp1 = {"temp1", "0", NULL, CVAR_ARCHIVE};
|
||||
cvar_t noexit = {"noexit", "0", NULL};
|
||||
cvar_t nomonsters = SCVAR("nomonsters", "0");
|
||||
cvar_t gamecfg = SCVAR("gamecfg", "0");
|
||||
cvar_t scratch1 = SCVAR("scratch1", "0");
|
||||
cvar_t scratch2 = SCVAR("scratch2", "0");
|
||||
cvar_t scratch3 = SCVAR("scratch3", "0");
|
||||
cvar_t scratch4 = SCVAR("scratch4", "0");
|
||||
cvar_t savedgamecfg = SCVARF("savedgamecfg", "0", CVAR_ARCHIVE);
|
||||
cvar_t saved1 = SCVARF("saved1", "0", CVAR_ARCHIVE);
|
||||
cvar_t saved2 = SCVARF("saved2", "0", CVAR_ARCHIVE);
|
||||
cvar_t saved3 = SCVARF("saved3", "0", CVAR_ARCHIVE);
|
||||
cvar_t saved4 = SCVARF("saved4", "0", CVAR_ARCHIVE);
|
||||
cvar_t temp1 = SCVARF("temp1", "0", CVAR_ARCHIVE);
|
||||
cvar_t noexit = SCVAR("noexit", "0");
|
||||
|
||||
cvar_t pr_maxedicts = {"pr_maxedicts", "2048", NULL, CVAR_LATCH};
|
||||
cvar_t pr_imitatemvdsv = {"pr_imitatemvdsv", "0", NULL, CVAR_LATCH};
|
||||
cvar_t pr_fixbrokenqccarrays = {"pr_fixbrokenqccarrays", "1", NULL, CVAR_LATCH};
|
||||
cvar_t pr_maxedicts = SCVARF("pr_maxedicts", "2048", CVAR_LATCH);
|
||||
cvar_t pr_imitatemvdsv = SCVARF("pr_imitatemvdsv", "0", CVAR_LATCH);
|
||||
cvar_t pr_fixbrokenqccarrays = SCVARF("pr_fixbrokenqccarrays", "1", CVAR_LATCH);
|
||||
|
||||
cvar_t pr_no_playerphysics = {"pr_no_playerphysics", "0", NULL, CVAR_LATCH};
|
||||
cvar_t pr_no_playerphysics = SCVARF("pr_no_playerphysics", "0", CVAR_LATCH);
|
||||
|
||||
cvar_t progs = {"progs", "", NULL, CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_NOTFROMSERVER};
|
||||
cvar_t qc_nonetaccess = {"qc_nonetaccess", "0"}; //prevent write_... builtins from doing anything. This means we can run any mod, specific to any engine, on the condition that it also has a qw or nq crc.
|
||||
cvar_t progs = SCVARF("progs", "", CVAR_ARCHIVE | CVAR_SERVERINFO | CVAR_NOTFROMSERVER);
|
||||
cvar_t qc_nonetaccess = SCVAR("qc_nonetaccess", "0"); //prevent write_... builtins from doing anything. This means we can run any mod, specific to any engine, on the condition that it also has a qw or nq crc.
|
||||
|
||||
cvar_t pr_overridebuiltins = {"pr_overridebuiltins", "1"};
|
||||
cvar_t pr_overridebuiltins = SCVAR("pr_overridebuiltins", "1");
|
||||
|
||||
cvar_t pr_compatabilitytest = {"pr_compatabilitytest", "0", NULL, CVAR_LATCH};
|
||||
cvar_t pr_compatabilitytest = SCVARF("pr_compatabilitytest", "0", CVAR_LATCH);
|
||||
|
||||
cvar_t pr_ssqc_coreonerror = {"pr_coreonerror", "1"};
|
||||
cvar_t pr_ssqc_coreonerror = SCVAR("pr_coreonerror", "1");
|
||||
|
||||
cvar_t pr_tempstringcount = {"pr_tempstringcount", "16"};
|
||||
cvar_t pr_tempstringsize = {"pr_tempstringsize", "4096"};
|
||||
cvar_t pr_tempstringcount = SCVAR("pr_tempstringcount", "16");
|
||||
cvar_t pr_tempstringsize = SCVAR("pr_tempstringsize", "4096");
|
||||
|
||||
cvar_t sv_gameplayfix_blowupfallenzombies = {"sv_gameplayfix_blowupfallenzombies", "0"};
|
||||
cvar_t sv_gameplayfix_blowupfallenzombies = SCVAR("sv_gameplayfix_blowupfallenzombies", "0");
|
||||
|
||||
cvar_t sv_addon[MAXADDONS];
|
||||
char cvargroup_progs[] = "Progs variables";
|
||||
|
@ -438,6 +438,7 @@ void PR_Deinit(void)
|
|||
|
||||
void PR_LoadGlabalStruct(void)
|
||||
{
|
||||
static float writeonly;
|
||||
static float dimension_send_default;
|
||||
int i;
|
||||
int *v;
|
||||
|
@ -476,6 +477,9 @@ void PR_LoadGlabalStruct(void)
|
|||
globalint (true, trace_ent);
|
||||
globalfloat (true, trace_inopen);
|
||||
globalfloat (true, trace_inwater);
|
||||
globalfloat (false, trace_endcontents);
|
||||
globalfloat (false, trace_surfaceflags);
|
||||
globalfloat (false, cycle_wrapped);
|
||||
globalint (false, msg_entity);
|
||||
globalfunc (false, main);
|
||||
globalfunc (true, StartFrame);
|
||||
|
@ -501,6 +505,14 @@ void PR_LoadGlabalStruct(void)
|
|||
{ //make sure dimension send is always a valid pointer.
|
||||
((nqglobalvars_t*)pr_globals)->dimension_send = &dimension_send_default;
|
||||
}
|
||||
if (!((nqglobalvars_t*)pr_globals)->trace_endcontents)
|
||||
{ //make sure dimension send is always a valid pointer.
|
||||
((nqglobalvars_t*)pr_globals)->trace_endcontents = &writeonly;
|
||||
}
|
||||
if (!((nqglobalvars_t*)pr_globals)->trace_surfaceflags)
|
||||
{ //make sure dimension send is always a valid pointer.
|
||||
((nqglobalvars_t*)pr_globals)->trace_surfaceflags = &writeonly;
|
||||
}
|
||||
|
||||
pr_global_struct->dimension_send = 255;
|
||||
|
||||
|
@ -2817,6 +2829,8 @@ static void PF_traceline (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
pr_global_struct->trace_fraction = trace.fraction;
|
||||
pr_global_struct->trace_inwater = trace.inwater;
|
||||
pr_global_struct->trace_inopen = trace.inopen;
|
||||
pr_global_struct->trace_surfaceflags = trace.surface?trace.surface->flags:0;
|
||||
pr_global_struct->trace_endcontents = trace.contents;
|
||||
// if (trace.fraction != 1)
|
||||
// VectorMA (trace.endpos, 4, trace.plane.normal, P_VEC(trace_endpos));
|
||||
// else
|
||||
|
@ -2854,6 +2868,8 @@ static void PF_traceboxh2 (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
pr_global_struct->trace_fraction = trace.fraction;
|
||||
pr_global_struct->trace_inwater = trace.inwater;
|
||||
pr_global_struct->trace_inopen = trace.inopen;
|
||||
pr_global_struct->trace_surfaceflags = trace.surface?trace.surface->flags:0;
|
||||
pr_global_struct->trace_endcontents = trace.contents;
|
||||
VectorCopy (trace.endpos, P_VEC(trace_endpos));
|
||||
VectorCopy (trace.plane.normal, P_VEC(trace_plane_normal));
|
||||
pr_global_struct->trace_plane_dist = trace.plane.dist;
|
||||
|
@ -2888,6 +2904,8 @@ static void PF_traceboxdp (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
pr_global_struct->trace_fraction = trace.fraction;
|
||||
pr_global_struct->trace_inwater = trace.inwater;
|
||||
pr_global_struct->trace_inopen = trace.inopen;
|
||||
pr_global_struct->trace_surfaceflags = trace.surface?trace.surface->flags:0;
|
||||
pr_global_struct->trace_endcontents = trace.contents;
|
||||
// if (trace.fraction != 1)
|
||||
// VectorMA (trace.endpos, 4, trace.plane.normal, P_VEC(trace_endpos));
|
||||
// else
|
||||
|
@ -2919,6 +2937,8 @@ static void PF_TraceToss (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
|||
pr_global_struct->trace_fraction = trace.fraction;
|
||||
pr_global_struct->trace_inwater = trace.inwater;
|
||||
pr_global_struct->trace_inopen = trace.inopen;
|
||||
pr_global_struct->trace_surfaceflags = trace.surface?trace.surface->flags:0;
|
||||
pr_global_struct->trace_endcontents = trace.contents;
|
||||
VectorCopy (trace.endpos, pr_global_struct->V_trace_endpos);
|
||||
VectorCopy (trace.plane.normal, pr_global_struct->V_trace_plane_normal);
|
||||
pr_global_struct->trace_plane_dist = trace.plane.dist;
|
||||
|
@ -4183,7 +4203,7 @@ vector aim(entity, missilespeed)
|
|||
=============
|
||||
*/
|
||||
//cvar_t sv_aim = {"sv_aim", "0.93"};
|
||||
cvar_t sv_aim = {"sv_aim", "2"};
|
||||
cvar_t sv_aim = SCVAR("sv_aim", "2");
|
||||
void PF_aim (progfuncs_t *prinst, struct globalvars_s *pr_globals)
|
||||
{
|
||||
edict_t *ent, *check, *bestent;
|
||||
|
|
|
@ -59,6 +59,8 @@ typedef struct nqglobalvars_s
|
|||
float *trace_allsolid;
|
||||
float *trace_startsolid;
|
||||
float *trace_fraction;
|
||||
float *trace_surfaceflags;
|
||||
float *trace_endcontents;
|
||||
vec3_t *V_trace_endpos;
|
||||
vec3_t *V_trace_plane_normal;
|
||||
float *trace_plane_dist;
|
||||
|
|
|
@ -32,7 +32,7 @@ qboolean sv_allow_cheats;
|
|||
int fp_messages=4, fp_persecond=4, fp_secondsdead=10;
|
||||
char fp_msg[255] = { 0 };
|
||||
extern cvar_t cl_warncmd;
|
||||
cvar_t sv_cheats = {"sv_cheats", "0", NULL, CVAR_LATCH};
|
||||
cvar_t sv_cheats = SCVARF("sv_cheats", "0", CVAR_LATCH);
|
||||
extern redirect_t sv_redirected;
|
||||
|
||||
extern cvar_t sv_public;
|
||||
|
|
|
@ -49,18 +49,18 @@ typedef struct {
|
|||
netadr_t adr;
|
||||
} sv_masterlist_t;
|
||||
sv_masterlist_t sv_masterlist[] = {
|
||||
{false, {"sv_master1", ""}},
|
||||
{false, {"sv_master2", ""}},
|
||||
{false, {"sv_master3", ""}},
|
||||
{false, {"sv_master4", ""}},
|
||||
{false, {"sv_master5", ""}},
|
||||
{false, {"sv_master6", ""}},
|
||||
{false, {"sv_master7", ""}},
|
||||
{false, {"sv_master8", ""}},
|
||||
{false, SCVAR("sv_master1", "")},
|
||||
{false, SCVAR("sv_master2", "")},
|
||||
{false, SCVAR("sv_master3", "")},
|
||||
{false, SCVAR("sv_master4", "")},
|
||||
{false, SCVAR("sv_master5", "")},
|
||||
{false, SCVAR("sv_master6", "")},
|
||||
{false, SCVAR("sv_master7", "")},
|
||||
{false, SCVAR("sv_master8", "")},
|
||||
|
||||
{true, {"sv_masterextra1", "ghdigital.com"}}, //69.59.212.88
|
||||
{true, {"sv_masterextra2", "dpmaster.deathmask.net"}}, //209.164.24.243
|
||||
{true, {"sv_masterextra3", "12.166.196.192"}}, //blaze.mindphukd.org (doesn't resolve currently but works as an ip)
|
||||
{true, SCVAR("sv_masterextra1", "ghdigital.com")}, //69.59.212.88
|
||||
{true, SCVAR("sv_masterextra2", "dpmaster.deathmask.net")}, //209.164.24.243
|
||||
{true, SCVAR("sv_masterextra3", "12.166.196.192")}, //blaze.mindphukd.org (doesn't resolve currently but works as an ip)
|
||||
{false, {NULL}}
|
||||
};
|
||||
|
||||
|
@ -68,103 +68,103 @@ client_t *host_client; // current client
|
|||
|
||||
// bound the size of the physics time tic
|
||||
#ifdef SERVERONLY
|
||||
cvar_t sv_mintic = {"sv_mintic","0.03"};
|
||||
cvar_t sv_mintic = SCVAR("sv_mintic","0.03");
|
||||
#else
|
||||
cvar_t sv_mintic = {"sv_mintic","0"}; //client builds can think as often as they want.
|
||||
cvar_t sv_mintic = SCVAR("sv_mintic","0"); //client builds can think as often as they want.
|
||||
#endif
|
||||
cvar_t sv_maxtic = {"sv_maxtic","0.1"};
|
||||
cvar_t sv_nailhack = {"sv_nailhack","0"};
|
||||
cvar_t sv_maxtic = SCVAR("sv_maxtic","0.1");
|
||||
cvar_t sv_nailhack = SCVAR("sv_nailhack","0");
|
||||
|
||||
|
||||
cvar_t timeout = {"timeout","65"}; // seconds without any message
|
||||
cvar_t zombietime = {"zombietime", "2"}; // seconds to sink messages
|
||||
cvar_t timeout = SCVAR("timeout","65"); // seconds without any message
|
||||
cvar_t zombietime = SCVAR("zombietime", "2"); // seconds to sink messages
|
||||
// after disconnect
|
||||
#ifdef SERVERONLY
|
||||
cvar_t developer = {"developer","0"}; // show extra messages
|
||||
cvar_t developer = SCVAR("developer","0"); // show extra messages
|
||||
|
||||
cvar_t rcon_password = {"rcon_password", ""}; // password for remote server commands
|
||||
cvar_t password = {"password", ""}; // password for entering the game
|
||||
cvar_t rcon_password = SCVAR("rcon_password", ""); // password for remote server commands
|
||||
cvar_t password = SCVAR("password", ""); // password for entering the game
|
||||
#else
|
||||
extern cvar_t developer;
|
||||
extern cvar_t rcon_password;
|
||||
extern cvar_t password;
|
||||
#endif
|
||||
cvar_t spectator_password = {"spectator_password", ""}; // password for entering as a sepctator
|
||||
cvar_t spectator_password = SCVAR("spectator_password", ""); // password for entering as a sepctator
|
||||
|
||||
cvar_t allow_download = {"allow_download", "1"};
|
||||
cvar_t allow_download_skins = {"allow_download_skins", "1"};
|
||||
cvar_t allow_download_models = {"allow_download_models", "1"};
|
||||
cvar_t allow_download_sounds = {"allow_download_sounds", "1"};
|
||||
cvar_t allow_download_demos = {"allow_download_demos", "1"};
|
||||
cvar_t allow_download_maps = {"allow_download_maps", "1"};
|
||||
cvar_t allow_download_anymap = {"allow_download_pakmaps", "0"};
|
||||
cvar_t allow_download_pakcontents = {"allow_download_pakcontents", "1"};
|
||||
cvar_t allow_download_root = {"allow_download_root", "0"};
|
||||
cvar_t allow_download_textures = {"allow_download_textures", "1"};
|
||||
cvar_t allow_download_pk3s = {"allow_download_pk3s", "1"};
|
||||
cvar_t allow_download_wads = {"allow_download_wads", "1"};
|
||||
cvar_t allow_download_configs = {"allow_download_configs", "0"};
|
||||
cvar_t allow_download = SCVAR("allow_download", "1");
|
||||
cvar_t allow_download_skins = SCVAR("allow_download_skins", "1");
|
||||
cvar_t allow_download_models = SCVAR("allow_download_models", "1");
|
||||
cvar_t allow_download_sounds = SCVAR("allow_download_sounds", "1");
|
||||
cvar_t allow_download_demos = SCVAR("allow_download_demos", "1");
|
||||
cvar_t allow_download_maps = SCVAR("allow_download_maps", "1");
|
||||
cvar_t allow_download_anymap = SCVAR("allow_download_pakmaps", "0");
|
||||
cvar_t allow_download_pakcontents = SCVAR("allow_download_pakcontents", "1");
|
||||
cvar_t allow_download_root = SCVAR("allow_download_root", "0");
|
||||
cvar_t allow_download_textures = SCVAR("allow_download_textures", "1");
|
||||
cvar_t allow_download_pk3s = SCVAR("allow_download_pk3s", "1");
|
||||
cvar_t allow_download_wads = SCVAR("allow_download_wads", "1");
|
||||
cvar_t allow_download_configs = SCVAR("allow_download_configs", "0");
|
||||
|
||||
cvar_t sv_public = {"sv_public", "0"};
|
||||
cvar_t sv_listen = {"sv_listen", "1"};
|
||||
cvar_t sv_reportheartbeats = {"sv_reportheartbeats", "1"};
|
||||
cvar_t sv_highchars = {"sv_highchars", "1"};
|
||||
cvar_t sv_loadentfiles = {"sv_loadentfiles", "1"};
|
||||
cvar_t sv_maxrate = {"sv_maxrate", "10000"};
|
||||
cvar_t sv_maxdrate = {"sv_maxdrate", "10000"};
|
||||
cvar_t sv_public = SCVAR("sv_public", "0");
|
||||
cvar_t sv_listen = SCVAR("sv_listen", "1");
|
||||
cvar_t sv_reportheartbeats = SCVAR("sv_reportheartbeats", "1");
|
||||
cvar_t sv_highchars = SCVAR("sv_highchars", "1");
|
||||
cvar_t sv_loadentfiles = SCVAR("sv_loadentfiles", "1");
|
||||
cvar_t sv_maxrate = SCVAR("sv_maxrate", "10000");
|
||||
cvar_t sv_maxdrate = SCVAR("sv_maxdrate", "10000");
|
||||
|
||||
cvar_t sv_bigcoords = {"sv_bigcoords", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t sv_bigcoords = SCVARF("sv_bigcoords", "", CVAR_SERVERINFO);
|
||||
|
||||
cvar_t sv_phs = {"sv_phs", "1"};
|
||||
cvar_t sv_resetparms = {"sv_resetparms", "0"};
|
||||
cvar_t sv_phs = SCVAR("sv_phs", "1");
|
||||
cvar_t sv_resetparms = SCVAR("sv_resetparms", "0");
|
||||
|
||||
cvar_t sv_master = {"sv_master", "0"};
|
||||
cvar_t sv_masterport = {"sv_masterport", "0"};
|
||||
cvar_t sv_master = SCVAR("sv_master", "0");
|
||||
cvar_t sv_masterport = SCVAR("sv_masterport", "0");
|
||||
|
||||
cvar_t sv_voicechat = {"sv_voicechat", "0"}; //still development.
|
||||
cvar_t sv_gamespeed = {"sv_gamespeed", "1"};
|
||||
cvar_t sv_csqcdebug = {"sv_csqcdebug", "0"};
|
||||
cvar_t sv_tcpport = {"sv_tcpport", "0"};
|
||||
cvar_t sv_voicechat = SCVAR("sv_voicechat", "0"); //still development.
|
||||
cvar_t sv_gamespeed = SCVAR("sv_gamespeed", "1");
|
||||
cvar_t sv_csqcdebug = SCVAR("sv_csqcdebug", "0");
|
||||
cvar_t sv_tcpport = SCVAR("sv_tcpport", "0");
|
||||
|
||||
cvar_t pausable = {"pausable", "1"};
|
||||
cvar_t pausable = SCVAR("pausable", "1");
|
||||
|
||||
|
||||
//
|
||||
// game rules mirrored in svs.info
|
||||
//
|
||||
cvar_t fraglimit = {"fraglimit", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t timelimit = {"timelimit", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t teamplay = {"teamplay", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t samelevel = {"samelevel", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t maxclients = {"maxclients", "8", NULL, CVAR_SERVERINFO};
|
||||
cvar_t maxspectators = {"maxspectators", "8", NULL, CVAR_SERVERINFO};
|
||||
cvar_t fraglimit = SCVARF("fraglimit", "" , CVAR_SERVERINFO);
|
||||
cvar_t timelimit = SCVARF("timelimit", "" , CVAR_SERVERINFO);
|
||||
cvar_t teamplay = SCVARF("teamplay", "" , CVAR_SERVERINFO);
|
||||
cvar_t samelevel = SCVARF("samelevel", "" , CVAR_SERVERINFO);
|
||||
cvar_t maxclients = SCVARF("maxclients", "8", CVAR_SERVERINFO);
|
||||
cvar_t maxspectators = SCVARF("maxspectators", "8", CVAR_SERVERINFO);
|
||||
#ifdef SERVERONLY
|
||||
cvar_t deathmatch = {"deathmatch", "1", NULL, CVAR_SERVERINFO}; // 0, 1, or 2
|
||||
cvar_t deathmatch = SCVARF("deathmatch", "1", CVAR_SERVERINFO); // 0, 1, or 2
|
||||
#else
|
||||
cvar_t deathmatch = {"deathmatch", "0", NULL, CVAR_SERVERINFO}; // 0, 1, or 2
|
||||
cvar_t deathmatch = SCVARF("deathmatch", "0", CVAR_SERVERINFO); // 0, 1, or 2
|
||||
#endif
|
||||
cvar_t coop = {"coop", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t skill = {"skill", "" , NULL, CVAR_SERVERINFO}; // 0, 1, 2 or 3
|
||||
cvar_t spawn = {"spawn", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t watervis = {"watervis", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t rearview = {"rearview", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t allow_luma = {"allow_luma", "1", NULL, CVAR_SERVERINFO};
|
||||
cvar_t allow_bump = {"allow_bump", "1", NULL, CVAR_SERVERINFO};
|
||||
cvar_t allow_skybox = {"allow_skybox", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t sv_allow_splitscreen = {"allow_splitscreen", "",NULL,CVAR_SERVERINFO};
|
||||
cvar_t fbskins = {"fbskins", "1", NULL, CVAR_SERVERINFO}; //to get rid of lame fuhquake fbskins
|
||||
cvar_t mirrors = {"mirrors", "" , NULL, CVAR_SERVERINFO};
|
||||
cvar_t coop = SCVARF("coop", "" , CVAR_SERVERINFO);
|
||||
cvar_t skill = SCVARF("skill", "" , CVAR_SERVERINFO); // 0, 1, 2 or 3
|
||||
cvar_t spawn = SCVARF("spawn", "" , CVAR_SERVERINFO);
|
||||
cvar_t watervis = SCVARF("watervis", "" , CVAR_SERVERINFO);
|
||||
cvar_t rearview = SCVARF("rearview", "" , CVAR_SERVERINFO);
|
||||
cvar_t allow_luma = SCVARF("allow_luma", "1", CVAR_SERVERINFO);
|
||||
cvar_t allow_bump = SCVARF("allow_bump", "1", CVAR_SERVERINFO);
|
||||
cvar_t allow_skybox = SCVARF("allow_skybox", "", CVAR_SERVERINFO);
|
||||
cvar_t sv_allow_splitscreen = SCVARF("allow_splitscreen","",CVAR_SERVERINFO);
|
||||
cvar_t fbskins = SCVARF("fbskins", "1", CVAR_SERVERINFO); //to get rid of lame fuhquake fbskins
|
||||
cvar_t mirrors = SCVARF("mirrors", "" , CVAR_SERVERINFO);
|
||||
|
||||
cvar_t sv_motd[] ={ {"sv_motd1", ""},
|
||||
{"sv_motd2", ""},
|
||||
{"sv_motd3", ""},
|
||||
{"sv_motd4", ""} };
|
||||
cvar_t sv_motd[] ={ SCVAR("sv_motd1", ""),
|
||||
SCVAR("sv_motd2", ""),
|
||||
SCVAR("sv_motd3", ""),
|
||||
SCVAR("sv_motd4", "") };
|
||||
|
||||
cvar_t sv_compatablehulls = {"sv_compatablehulls", "1"};
|
||||
cvar_t sv_compatablehulls = SCVAR("sv_compatablehulls", "1");
|
||||
|
||||
cvar_t hostname = {"hostname","unnamed", NULL, CVAR_SERVERINFO};
|
||||
cvar_t hostname = SCVARF("hostname","unnamed", CVAR_SERVERINFO);
|
||||
|
||||
cvar_t secure = {"secure", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t secure = SCVARF("secure", "", CVAR_SERVERINFO);
|
||||
|
||||
extern cvar_t sv_nomsec;
|
||||
|
||||
|
@ -2374,7 +2374,7 @@ typedef struct
|
|||
ipfilter_t ipfilters[MAX_IPFILTERS];
|
||||
int numipfilters;
|
||||
|
||||
cvar_t filterban = {"filterban", "1"};
|
||||
cvar_t filterban = SCVAR("filterban", "1");
|
||||
|
||||
/*
|
||||
=================
|
||||
|
|
|
@ -385,22 +385,22 @@ dir_t Sys_listdir (char *path, char *ext, qboolean usesorting)
|
|||
demobuffer->maxsize - demobuffer->end)
|
||||
|
||||
|
||||
cvar_t sv_demoUseCache = {"sv_demoUseCache", ""};
|
||||
cvar_t sv_demoCacheSize = {"sv_demoCacheSize", ""};
|
||||
cvar_t sv_demoMaxDirSize = {"sv_demoMaxDirSize", "102400"}; //so ktpro autorecords.
|
||||
cvar_t sv_demoDir = {"sv_demoDir", "demos"};
|
||||
cvar_t sv_demofps = {"sv_demofps", ""};
|
||||
cvar_t sv_demoPings = {"sv_demoPings", ""};
|
||||
cvar_t sv_demoNoVis = {"sv_demoNoVis", ""};
|
||||
cvar_t sv_demoMaxSize = {"sv_demoMaxSize", ""};
|
||||
cvar_t sv_demoExtraNames = {"sv_demoExtraNames", ""};
|
||||
cvar_t sv_demoUseCache = SCVAR("sv_demoUseCache", "");
|
||||
cvar_t sv_demoCacheSize = SCVAR("sv_demoCacheSize", "");
|
||||
cvar_t sv_demoMaxDirSize = SCVAR("sv_demoMaxDirSize", "102400"); //so ktpro autorecords.
|
||||
cvar_t sv_demoDir = SCVAR("sv_demoDir", "demos");
|
||||
cvar_t sv_demofps = SCVAR("sv_demofps", "");
|
||||
cvar_t sv_demoPings = SCVAR("sv_demoPings", "");
|
||||
cvar_t sv_demoNoVis = SCVAR("sv_demoNoVis", "");
|
||||
cvar_t sv_demoMaxSize = SCVAR("sv_demoMaxSize", "");
|
||||
cvar_t sv_demoExtraNames = SCVAR("sv_demoExtraNames", "");
|
||||
|
||||
cvar_t mvd_streamport = {"mvd_streamport", "0"};
|
||||
cvar_t mvd_maxstreams = {"mvd_maxstreams", "1"};
|
||||
cvar_t mvd_streamport = SCVAR("mvd_streamport", "0");
|
||||
cvar_t mvd_maxstreams = SCVAR("mvd_maxstreams", "1");
|
||||
|
||||
cvar_t sv_demoPrefix = {"sv_demoPrefix", ""};
|
||||
cvar_t sv_demoSuffix = {"sv_demoSuffix", ""};
|
||||
cvar_t sv_demotxt = {"sv_demotxt", "1"};
|
||||
cvar_t sv_demoPrefix = SCVAR("sv_demoPrefix", "");
|
||||
cvar_t sv_demoSuffix = SCVAR("sv_demoSuffix", "");
|
||||
cvar_t sv_demotxt = SCVAR("sv_demotxt", "1");
|
||||
|
||||
void SV_WriteMVDMessage (sizebuf_t *msg, int type, int to, float time);
|
||||
|
||||
|
|
|
@ -41,24 +41,24 @@ solid_edge items only clip against bsp models.
|
|||
|
||||
*/
|
||||
|
||||
cvar_t sv_maxvelocity = {"sv_maxvelocity","2000"};
|
||||
cvar_t sv_maxvelocity = SCVAR("sv_maxvelocity","2000");
|
||||
|
||||
cvar_t sv_gravity = { "sv_gravity", "800"};
|
||||
cvar_t sv_stopspeed = { "sv_stopspeed", "100"};
|
||||
cvar_t sv_maxspeed = { "sv_maxspeed", "320"};
|
||||
cvar_t sv_spectatormaxspeed = { "sv_spectatormaxspeed", "500"};
|
||||
cvar_t sv_accelerate = { "sv_accelerate", "10"};
|
||||
cvar_t sv_airaccelerate = { "sv_airaccelerate", "0.7"};
|
||||
cvar_t sv_wateraccelerate = { "sv_wateraccelerate", "10"};
|
||||
cvar_t sv_friction = { "sv_friction", "4"};
|
||||
cvar_t sv_waterfriction = { "sv_waterfriction", "4"};
|
||||
cvar_t sv_gravity = SCVAR( "sv_gravity", "800");
|
||||
cvar_t sv_stopspeed = SCVAR( "sv_stopspeed", "100");
|
||||
cvar_t sv_maxspeed = SCVAR( "sv_maxspeed", "320");
|
||||
cvar_t sv_spectatormaxspeed = SCVAR( "sv_spectatormaxspeed", "500");
|
||||
cvar_t sv_accelerate = SCVAR( "sv_accelerate", "10");
|
||||
cvar_t sv_airaccelerate = SCVAR( "sv_airaccelerate", "0.7");
|
||||
cvar_t sv_wateraccelerate = SCVAR( "sv_wateraccelerate", "10");
|
||||
cvar_t sv_friction = SCVAR( "sv_friction", "4");
|
||||
cvar_t sv_waterfriction = SCVAR( "sv_waterfriction", "4");
|
||||
|
||||
cvar_t pm_ktjump = {"pm_ktjump", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_bunnyspeedcap = {"pm_bunnyspeedcap", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_slidefix = {"pm_slidefix", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_slidyslopes = {"pm_slidyslopes", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_airstep = {"pm_airstep", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_walljump = {"pm_walljump", "", NULL, CVAR_SERVERINFO};
|
||||
cvar_t pm_ktjump = SCVARF("pm_ktjump", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_bunnyspeedcap = SCVARF("pm_bunnyspeedcap", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_slidefix = SCVARF("pm_slidefix", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_slidyslopes = SCVARF("pm_slidyslopes", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_airstep = SCVARF("pm_airstep", "", CVAR_SERVERINFO);
|
||||
cvar_t pm_walljump = SCVARF("pm_walljump", "", CVAR_SERVERINFO);
|
||||
|
||||
extern cvar_t sv_nomsec;
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ typedef struct {
|
|||
rankfileheader_t rankfileheader;
|
||||
FILE *rankfile;
|
||||
|
||||
cvar_t rank_autoadd = {"rank_autoadd", "1"};
|
||||
cvar_t rank_needlogin = {"rank_needlogin", "0"};
|
||||
cvar_t rank_filename = {"rank_filename", ""};
|
||||
cvar_t rank_autoadd = SCVAR("rank_autoadd", "1");
|
||||
cvar_t rank_needlogin = SCVAR("rank_needlogin", "0");
|
||||
cvar_t rank_filename = SCVAR("rank_filename", "");
|
||||
char rank_cvargroup[] = "server rankings";
|
||||
|
||||
#define RANKFILE_VERSION 0x00000000
|
||||
|
|
|
@ -33,37 +33,37 @@ edict_t *sv_player;
|
|||
usercmd_t cmd;
|
||||
|
||||
#ifdef SERVERONLY
|
||||
cvar_t cl_rollspeed = {"cl_rollspeed", "200"};
|
||||
cvar_t cl_rollangle = {"cl_rollangle", "2.0"};
|
||||
cvar_t cl_rollspeed = SCVAR("cl_rollspeed", "200");
|
||||
cvar_t cl_rollangle = SCVAR("cl_rollangle", "2.0");
|
||||
#else
|
||||
extern cvar_t cl_rollspeed;
|
||||
extern cvar_t cl_rollangle;
|
||||
#endif
|
||||
cvar_t sv_spectalk = {"sv_spectalk", "1"};
|
||||
cvar_t sv_spectalk = SCVAR("sv_spectalk", "1");
|
||||
|
||||
cvar_t sv_mapcheck = {"sv_mapcheck", "1"};
|
||||
cvar_t sv_mapcheck = SCVAR("sv_mapcheck", "1");
|
||||
|
||||
cvar_t sv_cheatpc = {"sv_cheatpc", "125"};
|
||||
cvar_t sv_cheatspeedchecktime = {"sv_cheatspeedchecktime", "30"};
|
||||
cvar_t sv_playermodelchecks = {"sv_playermodelchecks", "1"};
|
||||
cvar_t sv_cheatpc = SCVAR("sv_cheatpc", "125");
|
||||
cvar_t sv_cheatspeedchecktime = SCVAR("sv_cheatspeedchecktime", "30");
|
||||
cvar_t sv_playermodelchecks = SCVAR("sv_playermodelchecks", "1");
|
||||
|
||||
cvar_t sv_cmdlikercon = {"sv_cmdlikercon", "0"}; //set to 1 to allow a password of username:password instead of the correct rcon password.
|
||||
cvar_t cmd_allowaccess = {"cmd_allowaccess", "0"}; //set to 1 to allow cmd to execute console commands on the server.
|
||||
cvar_t cmd_gamecodelevel = {"cmd_gamecodelevel", "50"}; //execution level which gamecode is told about (for unrecognised commands)
|
||||
cvar_t sv_cmdlikercon = SCVAR("sv_cmdlikercon", "0"); //set to 1 to allow a password of username:password instead of the correct rcon password.
|
||||
cvar_t cmd_allowaccess = SCVAR("cmd_allowaccess", "0"); //set to 1 to allow cmd to execute console commands on the server.
|
||||
cvar_t cmd_gamecodelevel = SCVAR("cmd_gamecodelevel", "50"); //execution level which gamecode is told about (for unrecognised commands)
|
||||
|
||||
cvar_t sv_nomsec = {"sv_nomsec", "0"};
|
||||
cvar_t sv_edgefriction = {"sv_edgefriction", "2"};
|
||||
cvar_t sv_nomsec = SCVAR("sv_nomsec", "0");
|
||||
cvar_t sv_edgefriction = SCVAR("sv_edgefriction", "2");
|
||||
|
||||
cvar_t sv_brokenmovetypes = {"sv_brokenmovetypes", "0"};
|
||||
cvar_t sv_brokenmovetypes = SCVAR("sv_brokenmovetypes", "0");
|
||||
|
||||
cvar_t sv_chatfilter = {"sv_chatfilter", "0"};
|
||||
cvar_t sv_chatfilter = SCVAR("sv_chatfilter", "0");
|
||||
|
||||
cvar_t votelevel = {"votelevel", "0"};
|
||||
cvar_t voteminimum = {"voteminimum", "4"};
|
||||
cvar_t votepercent = {"votepercent", "-1"};
|
||||
cvar_t votetime = {"votetime", "10"};
|
||||
cvar_t votelevel = SCVAR("votelevel", "0");
|
||||
cvar_t voteminimum = SCVAR("voteminimum", "4");
|
||||
cvar_t votepercent = SCVAR("votepercent", "-1");
|
||||
cvar_t votetime = SCVAR("votetime", "10");
|
||||
|
||||
cvar_t pr_allowbutton1 = {"pr_allowbutton1", "1", NULL, CVAR_LATCH};
|
||||
cvar_t pr_allowbutton1 = SCVARF("pr_allowbutton1", "1", CVAR_LATCH);
|
||||
|
||||
|
||||
extern cvar_t pm_bunnyspeedcap;
|
||||
|
@ -72,7 +72,7 @@ extern cvar_t pm_slidefix;
|
|||
extern cvar_t pm_slidyslopes;
|
||||
extern cvar_t pm_airstep;
|
||||
extern cvar_t pm_walljump;
|
||||
cvar_t sv_pushplayers = {"sv_pushplayers", "0"};
|
||||
cvar_t sv_pushplayers = SCVAR("sv_pushplayers", "0");
|
||||
|
||||
char sv_votinggroup[] = "server voting";
|
||||
|
||||
|
@ -1739,6 +1739,28 @@ void SV_BeginDownload_f(void)
|
|||
#ifdef PEXT_CHUNKEDDOWNLOADS
|
||||
if (host_client->fteprotocolextensions & PEXT_CHUNKEDDOWNLOADS)
|
||||
{
|
||||
if (host_client->download->seekingisabadplan)
|
||||
{ //if seeking is a bad plan (for whatever reason - usually because of zip files)
|
||||
//create a temp file instead
|
||||
int i, len;
|
||||
char buffer[8192];
|
||||
vfsfile_t *tmp;
|
||||
tmp = FS_OpenTemp();
|
||||
|
||||
for (i = 0; ; i+=len)
|
||||
{
|
||||
len = sizeof(buffer);
|
||||
if (len > host_client->downloadsize-i)
|
||||
len = host_client->downloadsize-i;
|
||||
if (len == 0)
|
||||
break;
|
||||
VFS_READ(host_client->download, buffer, len);
|
||||
VFS_WRITE(tmp, buffer, len);
|
||||
}
|
||||
VFS_CLOSE(host_client->download);
|
||||
host_client->download = tmp;
|
||||
}
|
||||
|
||||
ClientReliableWrite_Begin (host_client, svc_download, 10+strlen(name));
|
||||
ClientReliableWrite_Long (host_client, -1);
|
||||
ClientReliableWrite_Long (host_client, host_client->downloadsize);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue