From: MirceaKitsune Date: Thu, 1 Mar 2012 10:12:08 +0000 (+0200) Subject: Cvar and fix crouch speed X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dec59284d2680f03706822b2b94067cbb10d9813;p=voretournament%2Fvoretournament.git Cvar and fix crouch speed --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index ffed64ea..84dd0fd9 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -383,6 +383,7 @@ cl_movement_airaccelerate $sv_airaccelerate cl_movement_edgefriction $edgefriction cl_movement_friction $sv_friction cl_movement_jumpvelocity $sv_jumpvelocity +cl_movement_crouchvelocity $sv_crouchvelocity cl_movement_maxairspeed $sv_maxairspeed cl_movement_maxspeed $sv_maxspeed cl_movement_stepheight $sv_stepheight @@ -1295,6 +1296,10 @@ seta gl_finish $gl_finish seta v_kicktime $v_kicktime seta r_subdivisions_tolerance $r_subdivisions_tolerance +// create CSQC physics cvars at normal defaults +set cl_movement_crouchvelocity 0.5 +set sv_crouchvelocity 0.5 + // ticrate sys_ticrate 0.0166667 cl_netfps 60 // should match diff --git a/data/physicsVT.cfg b/data/physicsVT.cfg index 71f2c06c..885587a2 100644 --- a/data/physicsVT.cfg +++ b/data/physicsVT.cfg @@ -9,6 +9,7 @@ sv_friction 6 edgefriction 1 sv_stepheight 34 sv_jumpvelocity 260 +sv_crouchvelocity 0.6 sv_wateraccelerate -1 sv_waterfriction -1 sv_airaccel_sideways_friction 0.35 diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 23ad3241..3b4afbc5 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -1380,6 +1380,7 @@ void FixClientCvars(entity e) stuffcmd(e, strcat("cl_movement_maxairspeed ", ftos(cvar("sv_maxairspeed")), "\n")); stuffcmd(e, strcat("cl_movement_stopspeed ", ftos(cvar("sv_stopspeed")), "\n")); stuffcmd(e, strcat("cl_movement_jumpvelocity ", ftos(cvar("sv_jumpvelocity")), "\n")); + stuffcmd(e, strcat("cl_movement_crouchvelocity ", ftos(cvar("sv_crouchvelocity")), "\n")); stuffcmd(e, strcat("cl_movement_stepheight ", ftos(cvar("sv_stepheight")), "\n")); stuffcmd(e, strcat("set cl_movement_friction_on_land ", ftos(cvar("sv_friction_on_land")), "\n")); stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(cvar("sv_airaccel_qw")), "\n")); diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 87d4a365..e595c69a 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -1156,7 +1156,7 @@ void SV_PlayerPhysics() if (wishspeed > sv_maxspeed*maxspd_mod) wishspeed = sv_maxspeed*maxspd_mod; if (self.crouch) - wishspeed = wishspeed * 0.5; + wishspeed = wishspeed * cvar("sv_crouchvelocity"); if (time >= self.teleport_time) PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0); } @@ -1188,7 +1188,7 @@ void SV_PlayerPhysics() if (wishspeed > maxairspd) wishspeed = maxairspd; if (self.crouch) - wishspeed = wishspeed * 0.5; + wishspeed = wishspeed * cvar("sv_crouchvelocity"); if (time >= self.teleport_time) { float accelerating; diff --git a/docs/TODO.txt b/docs/TODO.txt index 208b771a..9a124126 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -128,8 +128,6 @@ - 0.7: When a player sound has less volume because the player is in a belly, make sure that doesn't apply to neighboring prey, because they are there too -- 0.7: Fix crouch walking speed - - 0.7 BUG: Fix assignment to world.scale when there is no weapon model in hand - 0.7: I set a different horizontal and vertical view bobbing, but the menu sliders adjust both to the same value. Fix this somehow \ No newline at end of file