]> git.rm.cloudns.org Git - voretournament/voretournament.git/commitdiff
Properly calculate dodging speed based on player size, stomach load and prey / pred...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 16 May 2012 11:06:58 +0000 (14:06 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 16 May 2012 11:06:58 +0000 (14:06 +0300)
data/qcsrc/server/cl_physics.qc
docs/TODO.txt

index 9c2e34b4ab38f7e8191543fae5cde1e5f6e78148..d3aa8e513ca4aaa666441adb1dfb45713808bb52 100644 (file)
@@ -211,18 +211,16 @@ void PlayerDodge()
                common_factor = 1;\r
 \r
        new_velocity_gain = self.dodging_velocity_gain - (common_factor * cvar("sv_dodging_horiz_speed"));\r
-\r
-       if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher\r
-               new_velocity_gain *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale;\r
-       if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey\r
-               new_velocity_gain *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey"));\r
-       if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds\r
-               new_velocity_gain *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred"));\r
-\r
        if (new_velocity_gain < 0)\r
                new_velocity_gain = 0;\r
 \r
        velocity_difference = self.dodging_velocity_gain - new_velocity_gain;\r
+       if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher\r
+               velocity_difference *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale;\r
+       if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey\r
+               velocity_difference *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey"));\r
+       if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds\r
+               velocity_difference *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred"));\r
 \r
        // ramp up dodging speed by adding some velocity each frame.. TODO: do it! :D\r
        if (self.dodging_action == 1) {\r
index ffb6537a8245848a084763895d21af2de3968b49..8e5ad61c30ee1c350c464623b6f99a0c9ce96771 100644 (file)
 \r
 - 0.8: View blur while being swallowed (same one as damage blur), as well as the screen darkening perhaps\r
 \r
-- 0.8: Make crosshair size change based on distance of what you're looking at?\r
-\r
-- 0.8: Add dodging from Xonotic
\ No newline at end of file
+- 0.8: Make crosshair size change based on distance of what you're looking at?
\ No newline at end of file