From 62dde41ada94503a2742512e040e57855d639e97 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 11 May 2007 00:00:29 +0000 Subject: [PATCH] added friction and waterfriction movevars stats corrected sv_airaccel_qw and sv_airaccel_sideways_friction cvars (they had the wrong name string) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7261 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_input.c | 2 ++ quakedef.h | 2 ++ sv_phys.c | 5 ----- sv_user.c | 9 +++++++-- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cl_input.c b/cl_input.c index 2c733896..a2400a6f 100644 --- a/cl_input.c +++ b/cl_input.c @@ -1074,6 +1074,8 @@ void CL_UpdateMoveVars(void) cl.movevars_stepheight = cl.statsf[STAT_MOVEVARS_STEPHEIGHT]; cl.movevars_airaccel_qw = cl.statsf[STAT_MOVEVARS_AIRACCEL_QW]; cl.movevars_airaccel_sideways_friction = cl.statsf[STAT_MOVEVARS_AIRACCEL_SIDEWAYS_FRICTION]; + cl.movevars_friction = cl.statsf[STAT_MOVEVARS_FRICTION]; + cl.movevars_waterfriction = cl.statsf[STAT_MOVEVARS_WATERFRICTION]; // scale playback speed of demos by slowmo cvar if (cls.demoplayback) cl.movevars_slowmo *= slowmo.value; diff --git a/quakedef.h b/quakedef.h index fed34ab8..ad63c301 100644 --- a/quakedef.h +++ b/quakedef.h @@ -94,6 +94,8 @@ extern char engineversion[128]; //#define STAT_TIME 17 // FTE //#define STAT_VIEW2 20 // FTE #define STAT_VIEWZOOM 21 // DP +#define STAT_MOVEVARS_FRICTION 228 // DP +#define STAT_MOVEVARS_WATERFRICTION 239 // DP #define STAT_MOVEVARS_TICRATE 240 // DP #define STAT_MOVEVARS_TIMESCALE 241 // DP #define STAT_MOVEVARS_GRAVITY 242 // DP diff --git a/sv_phys.c b/sv_phys.c index b13f4f57..dd85b9b4 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -39,15 +39,10 @@ solid_edge items only clip against bsp models. */ -cvar_t sv_friction = {CVAR_NOTIFY, "sv_friction","4", "how fast you slow down"}; -cvar_t sv_waterfriction = {CVAR_NOTIFY, "sv_waterfriction","-1", "how fast you slow down, if less than 0 the sv_friction variable is used instead"}; -cvar_t sv_stopspeed = {CVAR_NOTIFY, "sv_stopspeed","100", "how fast you come to a complete stop"}; cvar_t sv_gravity = {CVAR_NOTIFY, "sv_gravity","800", "how fast you fall (512 = roughly earth gravity)"}; cvar_t sv_maxvelocity = {CVAR_NOTIFY, "sv_maxvelocity","2000", "universal speed limit on all entities"}; cvar_t sv_nostep = {CVAR_NOTIFY, "sv_nostep","0", "prevents MOVETYPE_STEP entities (monsters) from moving"}; -cvar_t sv_stepheight = {CVAR_NOTIFY, "sv_stepheight", "18", "how high you can step up (TW_SV_STEPCONTROL extension)"}; cvar_t sv_jumpstep = {CVAR_NOTIFY, "sv_jumpstep", "0", "whether you can step up while jumping (sv_gameplayfix_stepwhilejumping must also be 1)"}; -cvar_t sv_wallfriction = {CVAR_NOTIFY, "sv_wallfriction", "1", "how much you slow down when sliding along a wall"}; cvar_t sv_newflymove = {CVAR_NOTIFY, "sv_newflymove", "0", "enables simpler/buggier player physics (not recommended)"}; cvar_t sv_freezenonclients = {CVAR_NOTIFY, "sv_freezenonclients", "0", "freezes time, except for players, allowing you to walk around and take screenshots of explosions"}; cvar_t sv_playerphysicsqc = {CVAR_NOTIFY, "sv_playerphysicsqc", "1", "enables QuakeC function to override player physics"}; diff --git a/sv_user.c b/sv_user.c index df8e90ec..9032cf04 100644 --- a/sv_user.c +++ b/sv_user.c @@ -22,6 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "quakedef.h" #define DEBUGMOVES 0 +cvar_t sv_wallfriction = {CVAR_NOTIFY, "sv_wallfriction", "1", "how much you slow down when sliding along a wall"}; +cvar_t sv_stepheight = {CVAR_NOTIFY, "sv_stepheight", "18", "how high you can step up (TW_SV_STEPCONTROL extension)"}; +cvar_t sv_stopspeed = {CVAR_NOTIFY, "sv_stopspeed","100", "how fast you come to a complete stop"}; +cvar_t sv_friction = {CVAR_NOTIFY, "sv_friction","4", "how fast you slow down"}; +cvar_t sv_waterfriction = {CVAR_NOTIFY, "sv_waterfriction","-1", "how fast you slow down, if less than 0 the sv_friction variable is used instead"}; cvar_t sv_edgefriction = {0, "edgefriction", "2", "how much you slow down when nearing a ledge you might fall off"}; 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_maxspeed = {CVAR_NOTIFY, "sv_maxspeed", "320", "maximum speed a player can accelerate to when on ground (can be exceeded by tricks)"}; @@ -30,8 +35,8 @@ cvar_t sv_accelerate = {0, "sv_accelerate", "10", "rate at which a player accele cvar_t sv_airaccelerate = {0, "sv_airaccelerate", "-1", "rate at which a player accelerates to sv_maxairspeed while in the air, if less than 0 the sv_accelerate variable is used instead"}; cvar_t sv_wateraccelerate = {0, "sv_wateraccelerate", "-1", "rate at which a player accelerates to sv_maxspeed while in the air, if less than 0 the sv_accelerate variable is used instead"}; cvar_t sv_jumpvelocity = {0, "sv_jumpvelocity", "270", "cvar that can be used by QuakeC code for jump velocity"}; -cvar_t sv_airaccel_qw = {0, "sv_airaccelerate", "1", "ratio of QW-style air control as opposed to simple acceleration"}; -cvar_t sv_airaccel_sideways_friction = {0, "sv_airaccelerate", "", "anti-sideways movement stabilization (reduces speed gain when zigzagging)"}; +cvar_t sv_airaccel_qw = {0, "sv_airaccel_qw", "1", "ratio of QW-style air control as opposed to simple acceleration"}; +cvar_t sv_airaccel_sideways_friction = {0, "sv_airaccel_sideways_friction", "", "anti-sideways movement stabilization (reduces speed gain when zigzagging)"}; cvar_t sv_clmovement_enable = {0, "sv_clmovement_enable", "1", "whether to allow clients to use cl_movement prediction, which can cause choppy movement on the server which may annoy other players"}; cvar_t sv_clmovement_minping = {0, "sv_clmovement_minping", "0", "if client ping is below this time in milliseconds, then their ability to use cl_movement prediction is disabled for a while (as they don't need it)"}; cvar_t sv_clmovement_minping_disabletime = {0, "sv_clmovement_minping_disabletime", "1000", "when client falls below minping, disable their prediction for this many milliseconds (should be at least 1000 or else their prediction may turn on/off frequently)"}; -- 2.39.2