Bug #1018

Pause feature exit the demo

Added by Aranud over 2 years ago. Updated over 1 year ago.

Status:Fixed% Done:

100%

Priority:NormalSpent time:-
Assignee:-
Category:Client
Target version:2.76
OS: Arch:

Description

After hitting 4 times the SPACE button, which is used to pause, the demo is closed :

- First hit, the demo is paused
- Second hit the demo is unpaused
- Third hit, the demo is paused
- Fourth hit, back to main menu


Related issues

Related to ET: Legacy Development - Bug #695: Pressing ESC then Backspace shuts down the replay Fixed 06.12.2014
Related to ET: Legacy Development - Bug #922: Fix timescale div 0 issues Feedback 14.03.2016

Associated revisions

Revision 59a554a8
Added by Aranud over 1 year ago

client: fix pause feature exit the demo, refs #1018

At this point of the loading demo, the keyCatchers is set to 0 ... but
it should not and it’s only set to 2 (KEYCATCH_CGAME) few seconds after.
In this case, if a key was press to early after the demo start, the demo
is closed.

History

#1 Updated by Spyhawk over 2 years ago

  • Related to Bug #695: Pressing ESC then Backspace shuts down the replay added

#2 Updated by Spyhawk over 2 years ago

  • Status changed from New to Can't reproduce
  • Target version changed from 2.78 to 2.76

I cannot reproduce... fixed already?

#3 Updated by IR4T4 over 2 years ago

  • % Done changed from 0 to 10

I can still reproduce a buggy behaviour in demos when space is pressed several times in a row (but not always!).
It is resulting in server timeout disconnects or it is just aborting and opening the main menu.

#4 Updated by IR4T4 over 2 years ago

  • Status changed from Can't reproduce to Confirmed

#5 Updated by IR4T4 over 2 years ago

  • Related to Bug #922: Fix timescale div 0 issues added

#6 Updated by IR4T4 about 2 years ago

Spyhawk wrote:

I cannot reproduce... fixed already?

No. But meanwhile I’ve realized some of my demos work fine and others not.

#7 Updated by Aranud almost 2 years ago

This behaviour only appear during the first frames of the playback (around ~4-5s).
For some reason, the value of cls.keyCatchers is equal to 0 during the first frames.
But the intend value is KEYCATCH_CGAME (0x08)

The part of code which change space to espace and then exit demo is there :

From CL_KeyEvent() :

    // most keys during demo playback will bring up the menu, but non-ascii
    // keys can still be used for bound actions
    if (down x%x%x%x% (key < 128 || key == K_MOUSE1)
        x%x%x%x% (clc.demoplaying || cls.state == CA_CINEMATIC) x%x%x%x% !cls.keyCatchers)
    {

        Cvar_Set("nextdemo", "");
        key = K_ESCAPE;
    }

        [ ... ] 

        if (!(cls.keyCatchers x%x% KEYCATCH_UI))
        {
            if (cls.state == CA_ACTIVE x%x%x%x% !clc.demoplaying)
            {
                VM_Call(uivm, UI_SET_ACTIVE_MENU, UIMENU_INGAME);
            }
            else
            {
                CL_Disconnect_f();
                S_StopAllSounds();
                VM_Call(uivm, UI_SET_ACTIVE_MENU, UIMENU_MAIN);
            }
            return;
        }

#8 Updated by Aranud over 1 year ago

  • Status changed from Confirmed to Fixed
  • % Done changed from 10 to 100

Also available in: Atom PDF