]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Port pm_frametime to ClientState
authorMario <mario@smbclan.net>
Sat, 15 Jul 2017 17:13:21 +0000 (03:13 +1000)
committerMario <mario@smbclan.net>
Sat, 15 Jul 2017 17:13:21 +0000 (03:13 +1000)
qcsrc/common/physics/player.qc
qcsrc/common/physics/player.qh
qcsrc/server/client.qc
qcsrc/server/client.qh

index 3b86ebcecacc7433bfc8f86ad594e04d4f17be6c..2f62c409ad30a02e372f38fe0f969c4a02a756f0 100644 (file)
@@ -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;
index 88c735c630fac40950ba1e9eb965f1decc5f83ea..4af97abdc6af321da7940f8f98f2389d6ab9a677 100644 (file)
@@ -2,8 +2,6 @@
 
 // Client/server mappings
 
-.float pm_frametime;
-
 .entity conveyor;
 
 .float race_penalty;
index 58bf67762fe2f852de1b335aaab134dff74170b7..196297e5224f450c450590a2ae81477f344ff1fb 100644 (file)
@@ -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;
 }
 
 /*
index e82c413f6fa6969406d9881a0e98eb20a0a3b982..eb33c89b497fe94831dce29b8ae84534d1ca433d 100644 (file)
@@ -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));