Cvar and fix crouch speed
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 10:12:08 +0000 (12:12 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 10:12:08 +0000 (12:12 +0200)
data/defaultVT.cfg
data/physicsVT.cfg
data/qcsrc/server/cl_client.qc
data/qcsrc/server/cl_physics.qc
docs/TODO.txt

index ffed64ea68310e87c5d13bb1cbb45c2c6342e210..84dd0fd90743d9d6a2b7977da658edaa42cac6a1 100644 (file)
@@ -383,6 +383,7 @@ cl_movement_airaccelerate $sv_airaccelerate
 cl_movement_edgefriction $edgefriction\r
 cl_movement_friction $sv_friction\r
 cl_movement_jumpvelocity $sv_jumpvelocity\r
+cl_movement_crouchvelocity $sv_crouchvelocity\r
 cl_movement_maxairspeed $sv_maxairspeed\r
 cl_movement_maxspeed $sv_maxspeed\r
 cl_movement_stepheight $sv_stepheight\r
@@ -1295,6 +1296,10 @@ seta gl_finish $gl_finish
 seta v_kicktime $v_kicktime\r
 seta r_subdivisions_tolerance $r_subdivisions_tolerance\r
 \r
+// create CSQC physics cvars at normal defaults\r
+set cl_movement_crouchvelocity 0.5\r
+set sv_crouchvelocity 0.5\r
+\r
 // ticrate\r
 sys_ticrate 0.0166667\r
 cl_netfps 60 // should match\r
index 71f2c06c83c6c4da1ccf11cd20840af037724ee2..885587a29e39d3b968b5d3bb2220289665a8dd0b 100644 (file)
@@ -9,6 +9,7 @@ sv_friction 6
 edgefriction 1\r
 sv_stepheight 34\r
 sv_jumpvelocity 260\r
+sv_crouchvelocity 0.6\r
 sv_wateraccelerate -1\r
 sv_waterfriction -1\r
 sv_airaccel_sideways_friction 0.35\r
index 23ad32412ddb3fb536d10e5c3d3c12b991fa67dd..3b4afbc550cecae97cca0c537d319c4cc66b8e3f 100644 (file)
@@ -1380,6 +1380,7 @@ void FixClientCvars(entity e)
        stuffcmd(e, strcat("cl_movement_maxairspeed ", ftos(cvar("sv_maxairspeed")), "\n"));\r
        stuffcmd(e, strcat("cl_movement_stopspeed ", ftos(cvar("sv_stopspeed")), "\n"));\r
        stuffcmd(e, strcat("cl_movement_jumpvelocity ", ftos(cvar("sv_jumpvelocity")), "\n"));\r
+       stuffcmd(e, strcat("cl_movement_crouchvelocity ", ftos(cvar("sv_crouchvelocity")), "\n"));\r
        stuffcmd(e, strcat("cl_movement_stepheight ", ftos(cvar("sv_stepheight")), "\n"));\r
        stuffcmd(e, strcat("set cl_movement_friction_on_land ", ftos(cvar("sv_friction_on_land")), "\n"));\r
        stuffcmd(e, strcat("set cl_movement_airaccel_qw ", ftos(cvar("sv_airaccel_qw")), "\n"));\r
index 87d4a36595bd1cb5e20c2455817ff4740476e27e..e595c69abec6f924c39d6dedb37d66256c342f0a 100644 (file)
@@ -1156,7 +1156,7 @@ void SV_PlayerPhysics()
                if (wishspeed > sv_maxspeed*maxspd_mod)\r
                        wishspeed = sv_maxspeed*maxspd_mod;\r
                if (self.crouch)\r
-                       wishspeed = wishspeed * 0.5;\r
+                       wishspeed = wishspeed * cvar("sv_crouchvelocity");\r
                if (time >= self.teleport_time)\r
                        PM_Accelerate(wishdir, wishspeed, wishspeed, sv_accelerate*maxspd_mod, 1, 0);\r
        }\r
@@ -1188,7 +1188,7 @@ void SV_PlayerPhysics()
                if (wishspeed > maxairspd)\r
                        wishspeed = maxairspd;\r
                if (self.crouch)\r
-                       wishspeed = wishspeed * 0.5;\r
+                       wishspeed = wishspeed * cvar("sv_crouchvelocity");\r
                if (time >= self.teleport_time)\r
                {\r
                        float accelerating;\r
index 208b771a98ed116d1c233a5e487d94adf36a9d9f..9a12412659f9a0940ae922f9065d3e0fe74da13c 100644 (file)
 \r
 - 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\r
 \r
-- 0.7: Fix crouch walking speed\r
-\r
 - 0.7 BUG: Fix assignment to world.scale when there is no weapon model in hand\r
 \r
 - 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