]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/client.qc
Disable some input buttons while typing
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / client.qc
index 7a4f82fc5b2c33d317204992b5973e987dc9181d..285470be942a32bb79d92b3f1ad13c9a8b6e73dc 100644 (file)
@@ -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)