From: MirceaKitsune Date: Mon, 2 May 2011 13:44:47 +0000 (+0300) Subject: Scale the amount by which movement is influenced by size. Default it to 0.5 for reali... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7615a6d3b814bcfbfc615c2e87100d4fa8d35d10;p=voretournament%2Fvoretournament.git Scale the amount by which movement is influenced by size. Default it to 0.5 for realistic and correct feel. --- diff --git a/data/defaultVT.cfg b/data/defaultVT.cfg index 407073c8..549b8c8f 100644 --- a/data/defaultVT.cfg +++ b/data/defaultVT.cfg @@ -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" set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size" +set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running" set g_healthsize_min 25 "Player size may not drop below this amount of health" set g_healthsize_max 200 "Player size may not grow past this amount of health" diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index b6b686cf..9c2a82d6 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -56,7 +56,7 @@ void PlayerJump (void) mjumpheight = cvar("sv_jumpvelocity"); if(self.scale) // we are smaller or larger, so we jump lower or higher - mjumpheight *= self.scale; + mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; if (self.waterlevel >= WATERLEVEL_SWIMMING) { if (self.watertype == CONTENT_WATER) @@ -503,7 +503,7 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce accelqw = -accelqw; if(self.scale) // we are smaller or larger, so we run slower or faster - wishspeed *= self.scale; + wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; if(cvar("sv_gameplayfix_q2airaccelerate")) wishspeed0 = wishspeed;