From 1832ca94b309e6d542457a33c4ac5af10f4dc2a1 Mon Sep 17 00:00:00 2001 From: bones_was_here Date: Fri, 24 Nov 2023 05:45:12 +1000 Subject: [PATCH] Rename sv_gameplayfix_customstats to sv_qcstats, improve description It's an API change not a gameplay change. Signed-off-by: bones_was_here --- cmd.c | 2 +- sv_main.c | 4 ++-- sv_send.c | 4 ++-- svvm_cmds.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/cmd.c b/cmd.c index 6230fa02..66dfaa82 100644 --- a/cmd.c +++ b/cmd.c @@ -764,7 +764,7 @@ static void Cmd_Exec(cmd_state_t *cmd, const char *filename) Cbuf_InsertText(cmd, "\n" "csqc_polygons_defaultmaterial_nocullface 1\n" "con_chatsound_team_mask 13\n" -"sv_gameplayfix_customstats 1\n" +"sv_qcstats 1\n" "mod_q1bsp_zero_hullsize_cutoff 8.03125\n" ); break; diff --git a/sv_main.c b/sv_main.c index 4f6c2426..f656085c 100644 --- a/sv_main.c +++ b/sv_main.c @@ -129,7 +129,6 @@ cvar_t sv_gameplayfix_q1bsptracelinereportstexture = {CF_SERVER, "sv_gameplayfix 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"}; @@ -144,6 +143,7 @@ cvar_t sv_nostep = {CF_SERVER | CF_NOTIFY, "sv_nostep","0", "prevents MOVETYPE_S 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)"}; @@ -613,7 +613,7 @@ void SV_Init (void) 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); diff --git a/sv_send.c b/sv_send.c index a9675530..b7491e4a 100644 --- a/sv_send.c +++ b/sv_send.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "sv_demo.h" extern cvar_t sv_airaccel_qw_stretchfactor; -extern cvar_t sv_gameplayfix_customstats; +extern cvar_t sv_qcstats; extern cvar_t sv_warsowbunny_airforwardaccel; extern cvar_t sv_warsowbunny_accel; extern cvar_t sv_warsowbunny_topspeed; @@ -1205,7 +1205,7 @@ void SV_WriteClientdataToMessage (client_t *client, prvm_edict_t *ent, sizebuf_t //stats[STAT_SECRETS] = PRVM_serverglobalfloat(found_secrets); //stats[STAT_MONSTERS] = PRVM_serverglobalfloat(killed_monsters); - if(!sv_gameplayfix_customstats.integer) + if(!sv_qcstats.integer) { statsf[STAT_MOVEVARS_AIRACCEL_QW_STRETCHFACTOR] = sv_airaccel_qw_stretchfactor.value; statsf[STAT_MOVEVARS_AIRCONTROL_PENALTY] = sv_aircontrol_penalty.value; diff --git a/svvm_cmds.c b/svvm_cmds.c index a9d50af1..ab9dc257 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -1762,7 +1762,7 @@ void VM_SV_UpdateCustomStats (client_t *client, prvm_edict_t *ent, sizebuf_t *ms } } -extern cvar_t sv_gameplayfix_customstats; +extern cvar_t sv_qcstats; // void(float index, float type, .void field) SV_AddStat = #232; // Set up an auto-sent player stat. @@ -1813,9 +1813,9 @@ static void VM_SV_AddStat(prvm_prog_t *prog) // these are hazardous to override but sort of allowed if one wants to be adventurous... and enjoys warnings. if (i < MIN_VM_STAT) VM_Warning(prog, "PF_SV_AddStat: index (%i) < MIN_VM_STAT (%i) may conflict with engine stats - allowed, but this may break things\n", i, MIN_VM_STAT); - else if (i >= MAX_VM_STAT && !sv_gameplayfix_customstats.integer) + else if (i >= MAX_VM_STAT && !sv_qcstats.integer) VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_VM_STAT (%i) conflicts with engine stats - allowed, but this may break slowmo and stuff\n", i, MAX_VM_STAT); - else if (i > (MAX_VM_STAT - 4) && type == 1 && !sv_gameplayfix_customstats.integer) + else if (i > (MAX_VM_STAT - 4) && type == 1 && !sv_qcstats.integer) VM_Warning(prog, "PF_SV_AddStat: index (%i) >= MAX_VM_STAT (%i) - 4 with string type won't fit within MAX_VM_STAT, thus conflicting with engine stats - allowed, but this may break slowmo and stuff\n", i, MAX_VM_STAT); vm_customstats[i].type = type; -- 2.39.2