From a7f6fba9887caf837d2a49bddace39d39621d71d Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 17 Mar 2018 23:10:15 +1000 Subject: [PATCH] Disable some input buttons while typing --- qcsrc/server/client.qc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 7a4f82fc5..285470be9 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2805,11 +2805,14 @@ void PM_UpdateButtons(entity this, entity store) store.impulse = this.impulse; this.impulse = 0; + bool typing = this.buttonchat; + store.button0 = this.button0; - store.button2 = this.button2; - store.button3 = this.button3; + store.button1 = (typing) ? 0 : this.button1; + store.button2 = (typing) ? 0 : this.button2; + store.button3 = (typing) ? 0 : this.button3; store.button4 = this.button4; - store.button5 = this.button5; + store.button5 = (typing) ? 0 : this.button5; store.button6 = this.button6; store.button7 = this.button7; store.button8 = this.button8; @@ -2835,7 +2838,7 @@ void PM_UpdateButtons(entity this, entity store) store.ping_movementloss = this.ping_movementloss; store.v_angle = this.v_angle; - store.movement = this.movement; + store.movement = (typing) ? '0 0 0' : this.movement; } NET_HANDLE(fpsreport, bool) -- 2.39.2