]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/mutator_dodging.qc
Merge remote-tracking branch 'origin/terencehill/cmd_fixes'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_dodging.qc
index 3b193c163c9d61ea0cce471f7df999bdd0139323..bdd39b1283f487fe0e74ab42135b6d66f4b180c7 100644 (file)
@@ -55,6 +55,9 @@ MUTATOR_HOOKFUNCTION(dodging_PlayerPhysics) {
        float velocity_difference;
        float clean_up_and_do_nothing;
 
+    if (self.deadflag != DEAD_NO)
+        return 0;
+
        new_velocity_gain = 0;
        clean_up_and_do_nothing = 0;
 
@@ -241,8 +244,6 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                }
        }
 
-
-
        if (dodge_detected == 1) {
                self.last_dodging_time = time;
 
@@ -255,7 +256,7 @@ MUTATOR_HOOKFUNCTION(dodging_GetPressedKeys) {
                self.dodging_direction_y = tap_direction_y;
 
                // normalize the dodging_direction vector.. (unlike UT99) XD
-               length = length + self.dodging_direction_x * self.dodging_direction_x;
+               length =          self.dodging_direction_x * self.dodging_direction_x;
                length = length + self.dodging_direction_y * self.dodging_direction_y;
                length = sqrt(length);