From 0e4dabb236935123d0f2ea510e9d6357a8dafca0 Mon Sep 17 00:00:00 2001 From: havoc Date: Wed, 22 Jun 2011 20:13:42 +0000 Subject: [PATCH] added sv_gameplayfix_q1bsptracelinereportstexture cvar (default 1), to allow people to disable the surface-based traceline if they so desire git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11208 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=9b73f5e152089c02f4157b4f3cddcc884e3648cd --- model_brush.c | 5 ++++- server.h | 4 +++- sv_main.c | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/model_brush.c b/model_brush.c index 5874b1b8..e0153bb6 100644 --- a/model_brush.c +++ b/model_brush.c @@ -3697,7 +3697,10 @@ void Mod_Q1BSP_Load(dp_model_t *mod, void *buffer, void *bufferend) mod->soundfromcenter = true; mod->TraceBox = Mod_Q1BSP_TraceBox; - mod->TraceLine = Mod_Q1BSP_TraceLineAgainstSurfaces; // LordHavoc: use the surface-hitting version of TraceLine in all cases + if (sv_gameplayfix_q1bsptracelinereportstexture.integer) + mod->TraceLine = Mod_Q1BSP_TraceLineAgainstSurfaces; // LordHavoc: use the surface-hitting version of TraceLine in all cases + else + mod->TraceLine = Mod_Q1BSP_TraceLine; mod->TracePoint = Mod_Q1BSP_TracePoint; mod->PointSuperContents = Mod_Q1BSP_PointSuperContents; mod->TraceLineAgainstSurfaces = Mod_Q1BSP_TraceLineAgainstSurfaces; diff --git a/server.h b/server.h index ccadc9e2..d64db17b 100644 --- a/server.h +++ b/server.h @@ -431,13 +431,14 @@ extern cvar_t sv_gameplayfix_droptofloorstartsolid_nudgetocorrect; extern cvar_t sv_gameplayfix_easierwaterjump; extern cvar_t sv_gameplayfix_findradiusdistancetobox; extern cvar_t sv_gameplayfix_gravityunaffectedbyticrate; -extern cvar_t sv_gameplayfix_nogravityonground; extern cvar_t sv_gameplayfix_grenadebouncedownslopes; extern cvar_t sv_gameplayfix_multiplethinksperframe; extern cvar_t sv_gameplayfix_noairborncorpse; extern cvar_t sv_gameplayfix_noairborncorpse_allowsuspendeditems; extern cvar_t sv_gameplayfix_nudgeoutofsolid; extern cvar_t sv_gameplayfix_nudgeoutofsolid_separation; +extern cvar_t sv_gameplayfix_q2airaccelerate; +extern cvar_t sv_gameplayfix_nogravityonground; extern cvar_t sv_gameplayfix_setmodelrealbox; extern cvar_t sv_gameplayfix_slidemoveprojectiles; extern cvar_t sv_gameplayfix_stepdown; @@ -447,6 +448,7 @@ extern cvar_t sv_gameplayfix_nostepmoveonsteepslopes; extern cvar_t sv_gameplayfix_swiminbmodels; extern cvar_t sv_gameplayfix_upwardvelocityclearsongroundflag; extern cvar_t sv_gameplayfix_downtracesupportsongroundflag; +extern cvar_t sv_gameplayfix_q1bsptracelinereportstexture; extern cvar_t sv_gravity; extern cvar_t sv_idealpitchscale; extern cvar_t sv_jumpstep; diff --git a/sv_main.c b/sv_main.c index d8e232d1..7a1bf022 100644 --- a/sv_main.c +++ b/sv_main.c @@ -120,6 +120,7 @@ cvar_t sv_gameplayfix_nostepmoveonsteepslopes = {0, "sv_gameplayfix_nostepmoveon cvar_t sv_gameplayfix_swiminbmodels = {0, "sv_gameplayfix_swiminbmodels", "1", "causes pointcontents (used to determine if you are in a liquid) to check bmodel entities as well as the world model, so you can swim around in (possibly moving) water bmodel entities"}; cvar_t sv_gameplayfix_upwardvelocityclearsongroundflag = {0, "sv_gameplayfix_upwardvelocityclearsongroundflag", "1", "prevents monsters, items, and most other objects from being stuck to the floor when pushed around by damage, and other situations in mods"}; cvar_t sv_gameplayfix_downtracesupportsongroundflag = {0, "sv_gameplayfix_downtracesupportsongroundflag", "1", "prevents very short moves from clearing onground (which may make the player stick to the floor at high netfps)"}; +cvar_t sv_gameplayfix_q1bsptracelinereportstexture = {0, "sv_gameplayfix_q1bsptracelinereportstexture", "1", "enables mods to get accurate trace_texture results on q1bsp by using a surface-hitting traceline implementation rather than the standard solidbsp method, q3bsp always reports texture accurately"}; cvar_t sv_gravity = {CVAR_NOTIFY, "sv_gravity","800", "how fast you fall (512 = roughly earth gravity)"}; cvar_t sv_idealpitchscale = {0, "sv_idealpitchscale","0.8", "how much to look up/down slopes and stairs when not using freelook"}; cvar_t sv_jumpstep = {CVAR_NOTIFY, "sv_jumpstep", "0", "whether you can step up while jumping (sv_gameplayfix_stepwhilejumping must also be 1)"}; @@ -521,6 +522,7 @@ void SV_Init (void) Cvar_RegisterVariable (&sv_gameplayfix_swiminbmodels); Cvar_RegisterVariable (&sv_gameplayfix_upwardvelocityclearsongroundflag); Cvar_RegisterVariable (&sv_gameplayfix_downtracesupportsongroundflag); + Cvar_RegisterVariable (&sv_gameplayfix_q1bsptracelinereportstexture); Cvar_RegisterVariable (&sv_gravity); Cvar_RegisterVariable (&sv_idealpitchscale); Cvar_RegisterVariable (&sv_jumpstep); -- 2.39.2