]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
added friction and waterfriction movevars stats
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 May 2007 00:00:29 +0000 (00:00 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 11 May 2007 00:00:29 +0000 (00:00 +0000)
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
quakedef.h
sv_phys.c
sv_user.c

index 2c733896f13ade89f2c17f11370741553f18de3a..a2400a6f285c376ffacf264418ce5eb8645d1205 100644 (file)
@@ -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;
index fed34ab86f47f3220ebca2be1b5f5d7352f23aaa..ad63c3019dc8589697d9c9b3089fb3b617d3532f 100644 (file)
@@ -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
index b13f4f57c694ab6852892866d85345b513b7d1c9..dd85b9b497bae616056be4948cea73ff4cb1c87f 100644 (file)
--- 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"};
index df8e90ec9f13c927f4915c3486acdbb0c0dec472..9032cf0437d1ec8481fedf939eb97e9e08d33a12 100644 (file)
--- 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)"};