[nq,qw] Clear render state when leaving active state

This fixes a segfault caused by b0517e89293 that I had missed due to not
actually playing: ie, demo map changes were ok, but not in-game map
changes.
This commit is contained in:
Bill Currie 2021-12-18 11:28:59 +09:00
parent cd641e2b1c
commit 5128029368
2 changed files with 3 additions and 0 deletions

View file

@ -526,6 +526,7 @@ CL_SetState (cactive_t state)
if (old_state == ca_active) {
// leaving active state
S_AmbientOff ();
r_funcs->R_ClearState ();
}
switch (state) {
case ca_dedicated:

View file

@ -1150,6 +1150,8 @@ CL_SetState (cactive_t state)
// Auto demo recorder stops here
if (cl_autorecord->int_val && cls.demorecording)
CL_StopRecording ();
r_funcs->R_ClearState ();
} else if (state == ca_active) {
// entering active state
VID_SetCaption (cls.servername->str);