]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Disable client prediction when in follow mode (impossible to predict)
authorMario <mario.mario@y7mail.com>
Mon, 30 Mar 2020 13:43:59 +0000 (23:43 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 30 Mar 2020 13:44:15 +0000 (23:44 +1000)
qcsrc/ecs/systems/physics.qc

index b9eca8ca8e971859d2385633cad132de62ee1fd7..cd59c516c991386d6f6d8e7ef6c78353b3921658 100644 (file)
@@ -33,7 +33,12 @@ void sys_phys_update(entity this, float dt)
        if (IS_SVQC) {
                if (this.move_movetype == MOVETYPE_NONE) { return; }
                // when we get here, disableclientprediction cannot be 2
-               this.disableclientprediction = (this.move_qcphysics) ? -1 : 0;
+               if(this.move_movetype == MOVETYPE_FOLLOW) // not compatible with prediction
+                       this.disableclientprediction = 1;
+               else if(this.move_qcphysics)
+                       this.disableclientprediction = -1;
+               else
+                       this.disableclientprediction = 0;
        }
 
        viewloc_PlayerPhysics(this);