From 011fbd1a58903f74d743219081f5c5adafb0aa69 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:54:26 +0500 Subject: [PATCH 1/2] client: loop mp3 sound if needed under GoldSource. --- cl_dll/hud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index a8072977..e074b3fa 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -153,7 +153,7 @@ int __MsgFunc_PlayMP3( const char *pszName, int iSize, void *pbuf ) sprintf( path, "sound/%s", pszSound ); if( !IsXashFWGS() && gEngfuncs.pfnGetCvarPointer( "gl_overbright" ) ) { - sprintf( cmd, "mp3 play %s\n", path ); + sprintf( cmd, "mp3 %s %s\n", loop ? "loop" : "play", path ); gEngfuncs.pfnClientCmd( cmd ); } else From c709de9304f8d5498c75aab4fd36a6378f50cc33 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin <15944199+nekonomicon@users.noreply.github.com> Date: Wed, 29 Nov 2023 12:56:31 +0500 Subject: [PATCH 2/2] client: remove useless check. --- cl_dll/hud.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cl_dll/hud.cpp b/cl_dll/hud.cpp index e074b3fa..ef138fb1 100644 --- a/cl_dll/hud.cpp +++ b/cl_dll/hud.cpp @@ -151,7 +151,7 @@ int __MsgFunc_PlayMP3( const char *pszName, int iSize, void *pbuf ) loop = READ_BYTE(); sprintf( path, "sound/%s", pszSound ); - if( !IsXashFWGS() && gEngfuncs.pfnGetCvarPointer( "gl_overbright" ) ) + if( !IsXashFWGS( )) { sprintf( cmd, "mp3 %s %s\n", loop ? "loop" : "play", path ); gEngfuncs.pfnClientCmd( cmd );