From e7b84d1ea38e1f9af6068955a4ccd9b5fcdb2913 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 2 Jun 2020 07:07:31 +1000 Subject: [PATCH] Improve prediction of typing preventing movement --- qcsrc/common/physics/player.qc | 5 +++++ qcsrc/server/client.qc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/physics/player.qc b/qcsrc/common/physics/player.qc index 91073a88e..208070887 100644 --- a/qcsrc/common/physics/player.qc +++ b/qcsrc/common/physics/player.qc @@ -325,6 +325,9 @@ bool PlayerJump(entity this) if (PHYS_FROZEN(this)) return true; // no jumping in freezetag when frozen + if(PHYS_INPUT_BUTTON_CHAT(this) || PHYS_INPUT_BUTTON_MINIGAME(this)) + return true; // no jumping while typing + #ifdef SVQC if (this.player_blocked) return true; // no jumping while blocked @@ -680,6 +683,8 @@ void PM_check_slick(entity this) void PM_check_blocked(entity this) { + if(PHYS_INPUT_BUTTON_CHAT(this) || PHYS_INPUT_BUTTON_MINIGAME(this)) + PHYS_CS(this).movement = '0 0 0'; #ifdef SVQC if (!this.player_blocked) return; diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index a4885f024..c7ba841e6 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -3142,7 +3142,7 @@ void PM_UpdateButtons(entity this, entity store) store.ping_movementloss = this.ping_movementloss; store.v_angle = this.v_angle; - store.movement = (typing) ? '0 0 0' : this.movement; + store.movement = this.movement; } NET_HANDLE(fpsreport, bool) -- 2.39.2