]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/anticheat.qc
Simplify maths for most vlen cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / anticheat.qc
index 877d41657ca9741e77bc7c09f03a0b3aa0cb1f42..865010ff5c5a6d8afdfbd0f2280c4dbb1f46edef 100644 (file)
@@ -85,7 +85,7 @@ void anticheat_physics(entity this)
        this.anticheat_div0_strafebot_movement_prev = this.movement;
 
        // Note: this actually tries to detect snap-aim.
-       if(vlen(this.anticheat_div0_strafebot_forward_prev) && time > this.anticheat_fixangle_endtime) {
+       if(this.anticheat_div0_strafebot_forward_prev && time > this.anticheat_fixangle_endtime) {
                float cosangle = this.anticheat_div0_strafebot_forward_prev * v_forward;
                float angle = cosangle < -1 ? M_PI : cosangle > 1 ? 0 : acos(cosangle);
                /*