From c77c317370a0cb077cd44197efc0468ab75884b3 Mon Sep 17 00:00:00 2001 From: Spoike Date: Thu, 2 Mar 2006 19:52:00 +0000 Subject: [PATCH] Added an sv_gameplayfix_honest_tracelines cvar, which defaults to on. Set to 0 for compatability, or 1 for sanity. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2041 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/server/pr_cmds.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/server/pr_cmds.c b/engine/server/pr_cmds.c index 4dc6ff16d..0b94d8f2f 100644 --- a/engine/server/pr_cmds.c +++ b/engine/server/pr_cmds.c @@ -63,6 +63,7 @@ cvar_t pr_ssqc_coreonerror = SCVAR("pr_coreonerror", "1"); cvar_t pr_tempstringcount = SCVAR("pr_tempstringcount", "16"); cvar_t pr_tempstringsize = SCVAR("pr_tempstringsize", "4096"); +cvar_t sv_gameplayfix_honest_tracelines = SCVAR("sv_gameplayfix_honest_tracelines", "1"); cvar_t sv_gameplayfix_blowupfallenzombies = SCVAR("sv_gameplayfix_blowupfallenzombies", "0"); extern cvar_t sv_gameplayfix_noairborncorpse; @@ -933,6 +934,7 @@ void PR_Init(void) Cvar_Register (&pr_tempstringcount, cvargroup_progs); Cvar_Register (&pr_tempstringsize, cvargroup_progs); + Cvar_Register (&sv_gameplayfix_honest_tracelines, cvargroup_progs); Cvar_Register (&sv_gameplayfix_blowupfallenzombies, cvargroup_progs); Cvar_Register (&sv_gameplayfix_noairborncorpse, cvargroup_progs); } @@ -2826,6 +2828,10 @@ static void PF_traceline (progfuncs_t *prinst, struct globalvars_s *pr_globals) trace = SV_Move (v1, mins, maxs, v2, nomonsters, ent); ent->v->hull = savedhull; + if (trace.startsolid) + if (!sv_gameplayfix_honest_tracelines.value) + trace.fraction = 1; + pr_global_struct->trace_allsolid = trace.allsolid; pr_global_struct->trace_startsolid = trace.startsolid; pr_global_struct->trace_fraction = trace.fraction;