From: Martin Taibr Date: Wed, 16 Aug 2017 16:34:03 +0000 (+0200) Subject: comments X-Git-Tag: xonotic-v0.8.5~2430^2~15 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6a769bffe6c4af7cd6a1d539de3efb8eda5d3e60;p=xonotic%2Fxonotic-data.pk3dir.git comments --- diff --git a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc index 9ae4e51c6..3eed2de1b 100644 --- a/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc +++ b/qcsrc/common/mutators/mutator/dodging/sv_dodging.qc @@ -90,15 +90,12 @@ REGISTER_MUTATOR(dodging, true); // and to ramp up the dodge acceleration in the physics hook. .float last_dodging_time; -// This is the velocity gain to be added over the ramp time. -// It will decrease from frame to frame during dodging_action = 1 -// until it's 0. -//.float dodging_velocity_gain; - +// the total speed that will be added over the ramp time .float dodging_force_total; +// the part of total yet to be added .float dodging_force_remaining; -#ifdef CSQC // TODO what is this? 1) CSQC in sv_ file never even gets compiled 2) pressedkeys is only defined on server so this would be always 0 +#ifdef CSQC .int pressedkeys; #endif @@ -243,21 +240,6 @@ void PM_dodging(entity this) // if ramp time is smaller than frametime we get problems ;D common_factor = min(common_factor, 1); // TODO necessary with dodging_force_remaining? - /*float horiz_speed = determine_speed(this); // TODO kill this - //LOG_INFOF("velocity %f -> force %f\n", vlen(vec2(this.velocity)), horiz_speed); - float new_velocity_gain = this.dodging_velocity_gain - (common_factor * horiz_speed); - new_velocity_gain = max(0, new_velocity_gain); - - float velocity_difference = this.dodging_velocity_gain - new_velocity_gain;*/ - - /*float velocity_increase = min(common_factor * this.dodging_force_total, this.dodging_force_remaining; - this.dodging_force_remaining -= velocity_increase;*/ - - /*this.velocity += ((this.dodging_direction_y * velocity_difference) * v_right) - + ((this.dodging_direction_x * velocity_difference) * v_forward); - - this.dodging_velocity_gain = this.dodging_velocity_gain - velocity_difference;*/ - float velocity_increase = min(common_factor * this.dodging_force_total, this.dodging_force_remaining); this.dodging_force_remaining -= velocity_increase; LOG_INFOF("time %f velocity_increase: %f\n", time, velocity_increase);