From: Mario Date: Sat, 15 Jul 2017 20:26:53 +0000 (+1000) Subject: Fix compile and port usekeypressed to ClientState X-Git-Tag: xonotic-v0.8.5~2617 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=92c0d5a07e0b5fa7542313d34bb1d9fe131064e3;p=xonotic%2Fxonotic-data.pk3dir.git Fix compile and port usekeypressed to ClientState --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 6ce77198c..f34ca30fa 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 276f751b4..a358816a3 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));