Improve prediction of typing preventing movement
authorMario <mario.mario@y7mail.com>
Mon, 1 Jun 2020 21:07:31 +0000 (07:07 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 1 Jun 2020 21:07:31 +0000 (07:07 +1000)
qcsrc/common/physics/player.qc
qcsrc/server/client.qc

index 91073a8..2080708 100644 (file)
@@ -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;
index a4885f0..c7ba841 100644 (file)
@@ -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)