From: Mario Date: Sat, 30 Apr 2016 08:47:57 +0000 (+1000) Subject: Move setting of the slowmo cvar out of the physics function (physics are called multi... X-Git-Tag: xonotic-v0.8.2~939 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d381f405154cbc16442f01e456699938bddcaa06;p=xonotic%2Fxonotic-data.pk3dir.git Move setting of the slowmo cvar out of the physics function (physics are called multiple times per frame, can cause it to be inaccurate) --- 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