Change how movement cutting is applied
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 16:08:15 +0000 (19:08 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Sat, 9 Jul 2011 16:08:15 +0000 (19:08 +0300)
data/qcsrc/server/cl_physics.qc

index 36c5f0b..6b41a2c 100644 (file)
@@ -56,7 +56,10 @@ 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 *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
+               mjumpheight *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale;\r
+       if(self.swallow_progress_prey) // cut jumping based on swallow progress\r
+               mjumpheight *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd"));\r
+\r
        if (self.waterlevel >= WATERLEVEL_SWIMMING)\r
        {\r
                if (self.watertype == CONTENT_WATER)\r
@@ -504,6 +507,8 @@ void PM_Accelerate(vector wishdir, float wishspeed, float wishspeed0, float acce
 \r
        if(self.scale) // we are smaller or larger, so we run slower or faster\r
                wishspeed *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; \r
+       if(self.swallow_progress_prey) // cut speed based on swallow progress\r
+               wishspeed *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd"));\r
 \r
        if(cvar("sv_gameplayfix_q2airaccelerate"))\r
                wishspeed0 = wishspeed;\r
@@ -824,8 +829,6 @@ void SV_PlayerPhysics()
        maxspd_mod *= swampspd_mod; // only one common speed modder please!\r
        if(cvar("g_balance_vore_weight_gravity") > 0)\r
                maxspd_mod *= 1 - bound(0, self.stomach_load * cvar("g_balance_vore_weight_speed"), 1); // apply stomach weight\r
-       if(self.swallow_progress_prey && cvar("g_balance_vore_swallow_speed_cutspd"))\r
-               maxspd_mod *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd")); // cut speed based on swallow progress\r
        swampspd_mod = 1;\r
 \r
        // if dead, behave differently\r