]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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 91073a88e48bd79e0b949120b38857e1243d8e9b..208070887fa6f087ef54d86472225c7672f82212 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 a4885f024dc94456efc185a0fdefa9176cf78f59..c7ba841e6f92ee0e694ab53f3ca9ac406037de03 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)