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 b9eca8c..cd59c51 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);