From: Mario Date: Sat, 15 Jul 2017 17:13:21 +0000 (+1000) Subject: Port pm_frametime to ClientState X-Git-Tag: xonotic-v0.8.5~2632 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=7b55e194426a9015288d8411f1caee5cabbf964e;p=xonotic%2Fxonotic-data.pk3dir.git Port pm_frametime to ClientState --- 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));