From 92c0d5a07e0b5fa7542313d34bb1d9fe131064e3 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 16 Jul 2017 06:26:53 +1000 Subject: [PATCH] Fix compile and port usekeypressed to ClientState --- qcsrc/server/client.qc | 7 +++---- qcsrc/server/client.qh | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6ce77198c0..f34ca30fa1 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -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)) diff --git a/qcsrc/server/client.qh b/qcsrc/server/client.qh index 276f751b45..a358816a3f 100644 --- a/qcsrc/server/client.qh +++ b/qcsrc/server/client.qh @@ -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)); -- 2.39.2