[qw] Call CL_NetUpdate only when active

Calling CL_NetUpdate while not active (or more importantly, while not
connected) results in a buffer write error (Sys_Error). Active was
chosen because that's how the old sbar code worked, and it seems
reasonable to stick with it rather than requesting pings etc during the
connect process.
This commit is contained in:
Bill Currie 2022-11-12 11:41:09 +09:00
parent 1a9ec15a41
commit 0ea5c1fa14

View file

@ -1944,7 +1944,7 @@ Host_Frame (float time)
r_data->frametime = host_frametime;
cl.viewstate.time = realtime;
if (!cls.demoplayback) {
if (!cls.demoplayback && cls.state == ca_active) {
CL_NetUpdate ();
}
Sbar_Update (cl.time);