From eb79bc6b40b784560d869e60cc982643b362ed54 Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Tue, 5 May 2026 01:01:20 +0500 Subject: [PATCH] engine: use Host_IsLocalClient where it should be, as it checks for local games, not specifically singleplayer games --- engine/client/cl_main.c | 2 +- engine/client/dll_int/cl_gameui.c | 2 +- engine/client/sound/s_mix.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/engine/client/cl_main.c b/engine/client/cl_main.c index 4d100a8a..539eb626 100644 --- a/engine/client/cl_main.c +++ b/engine/client/cl_main.c @@ -2854,7 +2854,7 @@ static void CL_ReadPackets( void ) // hot precache and downloading resources if( cls.signon == SIGNONS && cl.lastresourcecheck < host.realtime ) { - double checktime = Host_IsLocalGame() ? 0.1 : 1.0; + double checktime = Host_IsLocalClient() ? 0.1 : 1.0; if( !cls.dl.custom && cl.resourcesneeded.pNext != &cl.resourcesneeded ) { diff --git a/engine/client/dll_int/cl_gameui.c b/engine/client/dll_int/cl_gameui.c index 37de8239..80ad6b78 100644 --- a/engine/client/dll_int/cl_gameui.c +++ b/engine/client/dll_int/cl_gameui.c @@ -188,7 +188,7 @@ void UI_ShowConnectionWarning( void ) if( cls.state != ca_connected ) return; - if( Host_IsLocalClient() ) + if( Host_IsLocalClient( )) return; if( ++cl.lostpackets == 8 ) diff --git a/engine/client/sound/s_mix.c b/engine/client/sound/s_mix.c index 13cbf84d..2d77ad99 100644 --- a/engine/client/sound/s_mix.c +++ b/engine/client/sound/s_mix.c @@ -233,7 +233,7 @@ static int VOX_MixChannelToBuffer( portable_samplepair_t *pbuf, channel_t *chan, static int S_MixNormalChannels( portable_samplepair_t *dst, int end, int rate ) { - const qboolean local = Host_IsLocalGame(); + const qboolean local = Host_IsLocalClient(); const qboolean ingame = CL_IsInGame(); const int num_samples = ( end - snd.paintedtime ) / ( SOUND_DMA_SPEED / rate );