]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
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 407073c804b12b91f1aba632b5757a8d4ab8390d..549b8c8fd743cc0e798d0fa948b68a9452ca5c32 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_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
 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 b6b686cf69549f06f23364fc2508a5d7185898d5..9c2a82d6e3414b5cb89604368dd08c38c3655a86 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
 \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
        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
                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
 \r
        if(cvar("sv_gameplayfix_q2airaccelerate"))\r
                wishspeed0 = wishspeed;\r