From 7b55e194426a9015288d8411f1caee5cabbf964e Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 16 Jul 2017 03:13:21 +1000 Subject: [PATCH] Port pm_frametime to ClientState --- qcsrc/common/physics/player.qc | 2 +- qcsrc/common/physics/player.qh | 2 -- qcsrc/server/client.qc | 6 +++--- qcsrc/server/client.qh | 1 + 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 3b86ebcec..2f62c409a 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -821,7 +821,7 @@ void CSQC_ClientMovement_PlayerMove_Frame(entity this) sys_phys_update(this, PHYS_INPUT_TIMELENGTH); #ifdef SVQC - this.pm_frametime = frametime; + CS(this).pm_frametime = frametime; #elif defined(CSQC) if((ITEMS_STAT(this) & IT_USING_JETPACK) && !IS_DEAD(this) && !intermission) this.csqcmodel_modelflags |= MF_ROCKET; diff --git a/qcsrc/common/physics/player.qh b/qcsrc/common/physics/player.qh index 88c735c63..4af97abdc 100644 --- a/qcsrc/common/physics/player.qh +++ b/qcsrc/common/physics/player.qh @@ -2,8 +2,6 @@ // Client/server mappings -.float pm_frametime; - .entity conveyor; .float race_penalty; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 58bf67762..196297e52 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2649,12 +2649,12 @@ void Player_Physics(entity this) if(!this.move_qcphysics) return; - if(!frametime && !this.pm_frametime) + if(!frametime && !CS(this).pm_frametime) return; - Movetype_Physics_NoMatchTicrate(this, this.pm_frametime, true); + Movetype_Physics_NoMatchTicrate(this, CS(this).pm_frametime, true); - this.pm_frametime = 0; + CS(this).pm_frametime = 0; } /* diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index e82c413f6..eb33c89b4 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -37,6 +37,7 @@ CLASS(Client, Object) ATTRIB(Client, muted, bool, this.muted); ATTRIB(Client, killindicator_teamchange, int, this.killindicator_teamchange); ATTRIB(Client, idlekick_lasttimeleft, float, this.idlekick_lasttimeleft); + ATTRIB(Client, pm_frametime, float, this.pm_frametime); METHOD(Client, m_unwind, bool(Client this)); -- 2.39.2