cvar_t sv_gameplayfix_unstickplayers = {CF_SERVER, "sv_gameplayfix_unstickplayers", "0", "big hack to try and fix the rare case of MOVETYPE_WALK entities getting stuck in the world clipping hull."};
cvar_t sv_gameplayfix_unstickentities = {CF_SERVER, "sv_gameplayfix_unstickentities", "1", "hack to check if entities are crossing world collision hull and try to move them to the right position, superseded by sv_gameplayfix_nudgeoutofsolid"};
cvar_t sv_gameplayfix_fixedcheckwatertransition = {CF_SERVER, "sv_gameplayfix_fixedcheckwatertransition", "1", "fix two very stupid bugs in SV_CheckWaterTransition when watertype is CONTENTS_EMPTY (the bugs causes waterlevel to be 1 on first frame, -1 on second frame - the fix makes it 0 on both frames)"};
-cvar_t sv_gameplayfix_customstats = {CF_SERVER, "sv_gameplayfix_customstats", "0", "Disable stats higher than 220, for use by certain games such as Xonotic"};
cvar_t sv_gravity = {CF_SERVER | CF_NOTIFY, "sv_gravity","800", "how fast you fall (512 = roughly earth gravity)"};
cvar_t sv_init_frame_count = {CF_SERVER, "sv_init_frame_count", "2", "number of frames to run to allow everything to settle before letting clients connect"};
cvar_t sv_idealpitchscale = {CF_SERVER, "sv_idealpitchscale","0.8", "how much to look up/down slopes and stairs when not using freelook"};
cvar_t sv_playerphysicsqc = {CF_SERVER | CF_NOTIFY, "sv_playerphysicsqc", "1", "enables QuakeC function to override player physics"};
cvar_t sv_progs = {CF_SERVER, "sv_progs", "progs.dat", "selects which quakec progs.dat file to run" };
cvar_t sv_protocolname = {CF_SERVER, "sv_protocolname", "DP7", "selects network protocol to host for (values include QUAKE, QUAKEDP, NEHAHRAMOVIE, DP1 and up)"};
+cvar_t sv_qcstats = {CF_SERVER, "sv_qcstats", "0", "Disables engine sending of stats 220 and above, for use by certain games such as Xonotic, NOTE: it's strongly recommended that SVQC send correct STAT_MOVEVARS_TICRATE and STAT_MOVEVARS_TIMESCALE"};
cvar_t sv_random_seed = {CF_SERVER, "sv_random_seed", "", "random seed; when set, on every map start this random seed is used to initialize the random number generator. Don't touch it unless for benchmarking or debugging"};
cvar_t host_limitlocal = {CF_SERVER, "host_limitlocal", "0", "whether to apply rate limiting to the local player in a listen server (only useful for testing)"};
cvar_t sv_sound_land = {CF_SERVER, "sv_sound_land", "demon/dland2.wav", "sound to play when MOVETYPE_STEP entity hits the ground at high speed (empty cvar disables the sound)"};
Cvar_RegisterVariable (&sv_gameplayfix_unstickplayers);
Cvar_RegisterVariable (&sv_gameplayfix_unstickentities);
Cvar_RegisterVariable (&sv_gameplayfix_fixedcheckwatertransition);
- Cvar_RegisterVariable (&sv_gameplayfix_customstats);
+ Cvar_RegisterVariable (&sv_qcstats);
Cvar_RegisterVariable (&sv_gravity);
Cvar_RegisterVariable (&sv_init_frame_count);
Cvar_RegisterVariable (&sv_idealpitchscale);
);
}
- strlcpy(client->name, "unconnected", sizeof(client->name));
- strlcpy(client->old_name, "unconnected", sizeof(client->old_name));
+ dp_strlcpy(client->name, "unconnected", sizeof(client->name));
+ dp_strlcpy(client->old_name, "unconnected", sizeof(client->old_name));
client->prespawned = false;
client->spawned = false;
client->begun = false;
Download_CheckExtensions(cmd);
- strlcpy(host_client->download_name, Cmd_Argv(cmd, 1), sizeof(host_client->download_name));
+ dp_strlcpy(host_client->download_name, Cmd_Argv(cmd, 1), sizeof(host_client->download_name));
extension = FS_FileExtension(host_client->download_name);
// host_client is asking to download a specified file
extensions[0] = '\0';
if(host_client->download_deflate)
- strlcat(extensions, " deflate", sizeof(extensions));
+ dp_strlcat(extensions, " deflate", sizeof(extensions));
Con_DPrintf("Downloading %s to %s\n", host_client->download_name, host_client->name);
// testing
//if (precachemode == 2)
// return 0;
- strlcpy(filename, s, sizeof(filename));
+ dp_strlcpy(filename, s, sizeof(filename));
for (i = 2;i < limit;i++)
{
if (!sv.model_precache[i][0])
}
if (precachemode == 1)
Con_Printf("SV_ModelIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
- strlcpy(sv.model_precache[i], filename, sizeof(sv.model_precache[i]));
+ dp_strlcpy(sv.model_precache[i], filename, sizeof(sv.model_precache[i]));
if (sv.state == ss_loading)
{
// running from SV_SpawnServer which is launched from the client console command interpreter
// testing
//if (precachemode == 2)
// return 0;
- strlcpy(filename, s, sizeof(filename));
+ dp_strlcpy(filename, s, sizeof(filename));
for (i = 1;i < limit;i++)
{
if (!sv.sound_precache[i][0])
}
if (precachemode == 1)
Con_Printf("SV_SoundIndex(\"%s\"): not precached (fix your code), precaching anyway\n", filename);
- strlcpy(sv.sound_precache[i], filename, sizeof(sv.sound_precache[i]));
+ dp_strlcpy(sv.sound_precache[i], filename, sizeof(sv.sound_precache[i]));
if (sv.state != ss_loading)
{
MSG_WriteByte(&sv.reliable_datagram, svc_precache);
sv.particleeffectnamesloaded = true;
memset(sv.particleeffectname, 0, sizeof(sv.particleeffectname));
for (i = 0;i < EFFECT_TOTAL;i++)
- strlcpy(sv.particleeffectname[i], standardeffectnames[i], sizeof(sv.particleeffectname[i]));
+ dp_strlcpy(sv.particleeffectname[i], standardeffectnames[i], sizeof(sv.particleeffectname[i]));
for (filepass = 0;;filepass++)
{
if (filepass == 0)
break;
if (argc < 16)
{
- strlcpy(argv[argc], com_token, sizeof(argv[argc]));
+ dp_strlcpy(argv[argc], com_token, sizeof(argv[argc]));
argc++;
}
}
}
else
{
- strlcpy(sv.particleeffectname[effectnameindex], argv[1], sizeof(sv.particleeffectname[effectnameindex]));
+ dp_strlcpy(sv.particleeffectname[effectnameindex], argv[1], sizeof(sv.particleeffectname[effectnameindex]));
break;
}
}
sv.csqc_progsize = (int)progsize;
sv.csqc_progcrc = CRC_Block(svs.csqc_progdata, progsize);
- strlcpy(sv.csqc_progname, csqc_progname.string, sizeof(sv.csqc_progname));
+ dp_strlcpy(sv.csqc_progname, csqc_progname.string, sizeof(sv.csqc_progname));
Con_DPrintf("server detected csqc progs file \"%s\" with size %i and crc %i\n", sv.csqc_progname, sv.csqc_progsize, sv.csqc_progcrc);
Con_DPrint("Compressing csprogs.dat\n");
sv.active = true;
// set level base name variables for later use
- strlcpy (sv.name, map, sizeof (sv.name));
- strlcpy(sv.worldname, modelname, sizeof(sv.worldname));
+ dp_strlcpy (sv.name, map, sizeof (sv.name));
+ dp_strlcpy(sv.worldname, modelname, sizeof(sv.worldname));
FS_StripExtension(sv.worldname, sv.worldnamenoextension, sizeof(sv.worldnamenoextension));
- strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename));
+ dp_strlcpy(sv.worldbasename, !strncmp(sv.worldnamenoextension, "maps/", 5) ? sv.worldnamenoextension + 5 : sv.worldnamenoextension, sizeof(sv.worldbasename));
//Cvar_SetQuick(&sv_worldmessage, sv.worldmessage); // set later after QC is spawned
Cvar_SetQuick(&sv_worldname, sv.worldname);
Cvar_SetQuick(&sv_worldnamenoextension, sv.worldnamenoextension);
World_SetSize(&sv.world, sv.worldname, sv.worldmodel->normalmins, sv.worldmodel->normalmaxs, prog);
World_Start(&sv.world);
- strlcpy(sv.sound_precache[0], "", sizeof(sv.sound_precache[0]));
+ dp_strlcpy(sv.sound_precache[0], "", sizeof(sv.sound_precache[0]));
- strlcpy(sv.model_precache[0], "", sizeof(sv.model_precache[0]));
- strlcpy(sv.model_precache[1], sv.worldname, sizeof(sv.model_precache[1]));
+ dp_strlcpy(sv.model_precache[0], "", sizeof(sv.model_precache[0]));
+ dp_strlcpy(sv.model_precache[1], sv.worldname, sizeof(sv.model_precache[1]));
for (i = 1;i < sv.worldmodel->brush.numsubmodels && i+1 < MAX_MODELS;i++)
{
dpsnprintf(sv.model_precache[i+1], sizeof(sv.model_precache[i+1]), "*%i", i);
}
}
- // update the map title cvar
- strlcpy(sv.worldmessage, PRVM_GetString(prog, PRVM_serveredictstring(prog->edicts, message)), sizeof(sv.worldmessage)); // map title (not related to filename)
- Cvar_SetQuick(&sv_worldmessage, sv.worldmessage);
+ // update the map title cvar (not related to filename)
+ Cvar_SetQuick(&sv_worldmessage, PRVM_GetString(prog, PRVM_serveredictstring(prog->edicts, message)));
Con_Printf("Server spawned.\n");
NetConn_Heartbeat (2);