From da20c91cdf9b61e6519db605a14b1676a2448987 Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 30 Mar 2020 23:43:59 +1000 Subject: [PATCH] Disable client prediction when in follow mode (impossible to predict) --- qcsrc/ecs/systems/physics.qc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/ecs/systems/physics.qc b/qcsrc/ecs/systems/physics.qc index b9eca8ca8..cd59c516c 100644 --- a/qcsrc/ecs/systems/physics.qc +++ b/qcsrc/ecs/systems/physics.qc @@ -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); -- 2.39.2