From: Mario Date: Mon, 1 Jun 2020 21:07:31 +0000 (+1000) Subject: Improve prediction of typing preventing movement X-Git-Tag: xonotic-v0.8.5~968 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e7b84d1ea38e1f9af6068955a4ccd9b5fcdb2913;p=xonotic%2Fxonotic-data.pk3dir.git Improve prediction of typing preventing movement --- 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)