]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lower the movement speed of frozen players further and add a comment to note why...
authorMario <mario.mario@y7mail.com>
Sat, 23 May 2020 15:34:40 +0000 (01:34 +1000)
committerMario <mario.mario@y7mail.com>
Sat, 23 May 2020 15:34:40 +0000 (01:34 +1000)
qcsrc/common/physics/player.qc

index cba24ff8e90f2e986ba041f2f8b0597c06b318ae..16abe38c80f6ca144389433c083e6db5c2a737c8 100644 (file)
@@ -622,9 +622,10 @@ void PM_check_frozen(entity this)
 #endif
        )
        {
-               PHYS_CS(this).movement_x = bound(-5, PHYS_CS(this).movement.x, 5);
-               PHYS_CS(this).movement_y = bound(-5, PHYS_CS(this).movement.y, 5);
-               PHYS_CS(this).movement_z = bound(-5, PHYS_CS(this).movement.z, 5);
+               // bind movement to a very slow speed so dodging can use .movement for directional calculations
+               PHYS_CS(this).movement_x = bound(-2, PHYS_CS(this).movement.x, 2);
+               PHYS_CS(this).movement_y = bound(-2, PHYS_CS(this).movement.y, 2);
+               PHYS_CS(this).movement_z = bound(-2, PHYS_CS(this).movement.z, 2);
        }
        else
                PHYS_CS(this).movement = '0 0 0';