FIx the segfault on changing levels caused by ca_active changes.

Host_Reconnect_f only set cls.signon to 0, so finding it as a place to
tweak was not so trivial :P Now it calls CL_SetState to do the job properly
:)
This commit is contained in:
Bill Currie 2012-06-24 11:22:37 +09:00
parent 415decb983
commit 9cb7e00946
3 changed files with 8 additions and 3 deletions

View file

@ -489,6 +489,7 @@ CL_SetState (cactive_t state)
break;
case ca_disconnected:
cls.signon = so_none;
cl.loading = true;
VID_SetCaption ("Disconnected");
break;
case ca_connected:
@ -506,6 +507,7 @@ CL_SetState (cactive_t state)
S_AmbientOn ();
break;
}
CL_UpdateScreen (cl.time);
}
if (con_module)
con_module->data->console->force_commandline = (state != ca_active);

View file

@ -362,9 +362,7 @@ Host_Restart_f (void)
static void
Host_Reconnect_f (void)
{
cl.loading = true;
CL_UpdateScreen (cl.time);
cls.signon = 0; // need new connection messages
CL_SetState (ca_connected);
}
/*

View file

@ -55,6 +55,11 @@ viddef_t viddef;
vid_render_data_t *r_data;
vid_render_funcs_t *r_funcs;
void
CL_SetState (cactive_t state)
{
}
void
CL_UpdateScreen (double realtime)
{