Scale the amount by which movement is influenced by size. Default it to 0.5 for reali...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 13:44:47 +0000 (16:44 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 13:44:47 +0000 (16:44 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_physics.qc

index 407073c..549b8c8 100644 (file)
@@ -1548,6 +1548,7 @@ set g_vore_regurgitatecolor_digest "0.15 0.25 0" "the color players will have wh
 set g_vore_keepdeadprey 1 "If enabled, prey remains in the stomach after dying, else the predator throws up their dead body. 0 = disabled, 1 = enabled, anything between = probability"\r
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
+set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
 set g_healthsize_min 25 "Player size may not drop below this amount of health"\r
 set g_healthsize_max 200 "Player size may not grow past this amount of health"\r
 \r
index b6b686c..9c2a82d 100644 (file)
@@ -56,7 +56,7 @@ void PlayerJump (void)
 \r
        mjumpheight = cvar("sv_jumpvelocity");\r
        if(self.scale) // we are smaller or larger, so we jump lower or higher\r
-               mjumpheight *= self.scale;\r
+               mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
        if (self.waterlevel >= WATERLEVEL_SWIMMING)\r
        {\r
                if (self.watertype == CONTENT_WATER)\r
@@ -503,7 +503,7 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce
                accelqw = -accelqw;\r
 \r
        if(self.scale) // we are smaller or larger, so we run slower or faster\r
-               wishspeed *= self.scale;\r
+               wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
 \r
        if(cvar("sv_gameplayfix_q2airaccelerate"))\r
                wishspeed0 = wishspeed;\r