[qw,nq] Connect up key_demo

And clean up some remaining keydest refs (still a few more to go).

Need to sort out default bindings for key_demo, though.
This commit is contained in:
Bill Currie 2021-11-26 01:59:18 +09:00
parent 70c2fdce9e
commit 413cea6b4a
6 changed files with 3 additions and 21 deletions

View file

@ -126,7 +126,6 @@ CL_StopPlayback (void)
Qclose (cls.demofile);
cls.demofile = NULL;
cls.key_dest = key_game;
CL_SetState (ca_disconnected);
cls.demo_capture = 0;
cls.demoplayback = 0;
@ -480,7 +479,6 @@ CL_StartDemo (void)
cls.demoplayback = true;
CL_SetState (ca_connected);
cls.forcetrack = 0;
cls.key_dest = key_demo;
while ((c = Qgetc (cls.demofile)) != '\n')
if (c == '-')

View file

@ -440,7 +440,7 @@ CL_Input_Init (cbuf_t *cbuf)
void
CL_Input_Activate (void)
{
host_in_game = 1;
IMT_SetContext (cl_game_context);
host_in_game = !cls.demoplayback;
IMT_SetContext (cls.demoplayback ? cl_demo_context : cl_game_context);
IE_Set_Focus (cl_event_id);
}

View file

@ -350,7 +350,6 @@ CL_EstablishConnection (const char *host)
cls.demonum = -1; // not in the demo loop now
CL_SetState (ca_connected);
//Key_SetKeyDest (cls.key_dest);
}
/*
@ -526,7 +525,6 @@ CL_SetState (cactive_t state)
if (old_state != state) {
if (old_state == ca_active) {
// leaving active state
//Key_SetKeyDest (key_console);
S_AmbientOff ();
}
switch (state) {
@ -541,14 +539,12 @@ CL_SetState (cactive_t state)
cls.signon = so_none; // need all the signon messages
// before playing
cl.loading = true;
//Key_SetKeyDest (cls.key_dest);
IN_ClearStates ();
VID_SetCaption ("Connected");
break;
case ca_active:
// entering active state
cl.loading = false;
//Key_SetKeyDest (cls.key_dest);
IN_ClearStates ();
VID_SetCaption ("");
S_AmbientOn ();
@ -613,6 +609,5 @@ CL_Init (cbuf_t *cbuf)
"to be level");
SZ_Alloc (&cls.message, 1024);
cls.key_dest = key_game;
CL_SetState (ca_disconnected);
}

View file

@ -58,11 +58,6 @@ GIB_Key_Init (void)
{
}
void
Key_KeydestCallback (keydest_callback_t *callback, void *data)
{
}
void
CL_SetState (cactive_t state)
{
@ -145,11 +140,6 @@ IN_ProcessEvents (void)
{
}
void
Key_WriteBindings (QFile *f)
{
}
void
S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right,
const vec3_t v_up, const byte *ambient_sound_level)

View file

@ -1014,7 +1014,6 @@ CL_StartDemo (void)
Sys_Printf ("Playing demo from %s.\n", name->str);
cls.demoplayback = true;
//Key_SetKeyDest (key_demo);
net_blocksend = 1;
if (type == 2) {
cls.demoplayback2 = true;

View file

@ -597,7 +597,7 @@ CL_Input_Init (void)
void
CL_Input_Activate (void)
{
IMT_SetContext (cl_game_context);
IMT_SetContext (cls.demoplayback ? cl_demo_context : cl_game_context);
IE_Set_Focus (cl_event_id);
}