]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix compile and port usekeypressed to ClientState
authorMario <mario@smbclan.net>
Sat, 15 Jul 2017 20:26:53 +0000 (06:26 +1000)
committerMario <mario@smbclan.net>
Sat, 15 Jul 2017 20:26:53 +0000 (06:26 +1000)
qcsrc/server/client.qc
qcsrc/server/client.qh

index 6ce77198c0410ff52588f1d24de2fd334956962e..f34ca30fa1f76d40acb986b714ec1d82a42691f3 100644 (file)
@@ -2106,6 +2106,7 @@ bool joinAllowed(entity this)
        return true;
 }
 
+.int items_added;
 bool PlayerThink(entity this)
 {
        CheckRules_Player(this);
@@ -2445,9 +2446,7 @@ PlayerPreThink
 Called every frame for each client before the physics are run
 =============
 */
-.float usekeypressed;
 .float last_vehiclecheck;
-.int items_added;
 void PlayerPreThink (entity this)
 {
        WarpZone_PlayerPhysics_FixVAngle(this);
@@ -2561,9 +2560,9 @@ void PlayerPreThink (entity this)
 
        if(!this.cvar_cl_newusekeysupported) // FIXME remove this - it was a stupid idea to begin with, we can JUST use the button
        {
-               if(PHYS_INPUT_BUTTON_USE(this) && !this.usekeypressed)
+               if(PHYS_INPUT_BUTTON_USE(this) && !CS(this).usekeypressed)
                        PlayerUseKey(this);
-               this.usekeypressed = PHYS_INPUT_BUTTON_USE(this);
+               CS(this).usekeypressed = PHYS_INPUT_BUTTON_USE(this);
        }
 
        if (IS_REAL_CLIENT(this))
index 276f751b4564ba867daf33a46e0d3444d12b11bc..a358816a3fa9427fccd93c0402aaf3d0829ef2de 100644 (file)
@@ -79,6 +79,7 @@ CLASS(Client, Object)
     ATTRIB(Client, teamkill_complain, float, this.teamkill_complain);
     ATTRIB(Client, teamkill_soundtime, float, this.teamkill_soundtime);
     ATTRIB(Client, teamkill_soundsource, entity, this.teamkill_soundsource);
+    ATTRIB(Client, usekeypressed, bool, this.usekeypressed);
 
     METHOD(Client, m_unwind, bool(Client this));