From: MirceaKitsune Date: Wed, 16 May 2012 11:06:58 +0000 (+0300) Subject: Properly calculate dodging speed based on player size, stomach load and prey / pred... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5209469a2bea02bd597584236d906d4a1e4cd632;p=voretournament%2Fvoretournament.git Properly calculate dodging speed based on player size, stomach load and prey / pred swallow progress. Tested and complete --- diff --git a/data/qcsrc/server/cl_physics.qc b/data/qcsrc/server/cl_physics.qc index 9c2e34b4..d3aa8e51 100644 --- a/data/qcsrc/server/cl_physics.qc +++ b/data/qcsrc/server/cl_physics.qc @@ -211,18 +211,16 @@ void PlayerDodge() common_factor = 1; new_velocity_gain = self.dodging_velocity_gain - (common_factor * cvar("sv_dodging_horiz_speed")); - - if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher - new_velocity_gain *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; - if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey - new_velocity_gain *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey")); - if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds - new_velocity_gain *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred")); - if (new_velocity_gain < 0) new_velocity_gain = 0; velocity_difference = self.dodging_velocity_gain - new_velocity_gain; + if(cvar("g_healthsize")) // if we are smaller or larger, we jump lower or higher + velocity_difference *= (1 - cvar("g_healthsize_movementfactor")) + cvar("g_healthsize_movementfactor") * self.scale; + if(self.swallow_progress_prey) // cut jumping based on swallow progress for prey + velocity_difference *= 1 - (self.swallow_progress_prey * cvar("g_balance_vore_swallow_speed_cutspd_prey")); + if(self.swallow_progress_pred) // cut jumping based on swallow progress for preds + velocity_difference *= 1 - (self.swallow_progress_pred * cvar("g_balance_vore_swallow_speed_cutspd_pred")); // ramp up dodging speed by adding some velocity each frame.. TODO: do it! :D if (self.dodging_action == 1) { diff --git a/docs/TODO.txt b/docs/TODO.txt index ffb6537a..8e5ad61c 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -210,6 +210,4 @@ - 0.8: View blur while being swallowed (same one as damage blur), as well as the screen darkening perhaps -- 0.8: Make crosshair size change based on distance of what you're looking at? - -- 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