From d381f405154cbc16442f01e456699938bddcaa06 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 30 Apr 2016 18:47:57 +1000 Subject: [PATCH] Move setting of the slowmo cvar out of the physics function (physics are called multiple times per frame, can cause it to be inaccurate) --- qcsrc/client/view.qc | 4 ++++ qcsrc/common/physics/player.qc | 3 --- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 4537e56a4..68711ef3b 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -1392,6 +1392,10 @@ void CSQC_UpdateView(float w, float h) else view_quality = 1; + // this needs to be updated manually now due to the destruction of engine physics stats + if(autocvar_slowmo != STAT(MOVEVARS_TIMESCALE)) + cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE))); + button_attack2 = PHYS_INPUT_BUTTON_ATCK2(this); button_zoom = PHYS_INPUT_BUTTON_ZOOM(this); diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 7f20bfe9a..302104351 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -1332,9 +1332,6 @@ void PM_Main(entity this) if (this.PlayerPhysplug) if (this.PlayerPhysplug(this)) return; -#elif defined(CSQC) - if(autocvar_slowmo != STAT(MOVEVARS_TIMESCALE)) - cvar_set("slowmo", ftos(STAT(MOVEVARS_TIMESCALE))); #endif #ifdef SVQC -- 2.39.2