From: Mario Date: Sat, 17 Mar 2018 13:10:15 +0000 (+1000) Subject: Disable some input buttons while typing X-Git-Tag: xonotic-v0.8.5~2227 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a7f6fba9887caf837d2a49bddace39d39621d71d;p=xonotic%2Fxonotic-data.pk3dir.git Disable some input buttons while typing --- 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)