mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-02-06 12:04:17 +00:00
Fix mp3 playing in steam.
This commit is contained in:
parent
003ef5c414
commit
9e49b2fcf5
@ -102,19 +102,33 @@ void __CmdFunc_ToggleServerBrowser( void )
|
||||
|
||||
int __MsgFunc_PlayMP3( const char *pszName, int iSize, void *pbuf )
|
||||
{
|
||||
const char *pszSound;
|
||||
char cmd[64];
|
||||
|
||||
BEGIN_READ( pbuf, iSize );
|
||||
|
||||
sprintf( cmd, "sound/mp3/%s", READ_STRING() );
|
||||
gEngfuncs.pfnPrimeMusicStream( cmd, 1 );
|
||||
pszSound = READ_STRING();
|
||||
|
||||
if( !IsXashFWGS() && gEngfuncs.pfnGetCvarPointer( "gl_overbright" ) )
|
||||
{
|
||||
sprintf( cmd, "mp3 play sound/mp3/%s\n", pszSound );
|
||||
gEngfuncs.pfnClientCmd( cmd );
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf( cmd, "sound/mp3/%s", pszSound );
|
||||
gEngfuncs.pfnPrimeMusicStream( cmd, 1 );
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
void __CmdFunc_StopMP3( void )
|
||||
{
|
||||
gEngfuncs.pfnPrimeMusicStream( 0, 0 );
|
||||
if( !IsXashFWGS() && gEngfuncs.pfnGetCvarPointer( "gl_overbright" ) )
|
||||
gEngfuncs.pfnClientCmd( "mp3 stop\n" );
|
||||
else
|
||||
gEngfuncs.pfnPrimeMusicStream( 0, 0 );
|
||||
}
|
||||
|
||||
// TFFree Command Menu Message Handlers
|
||||
|
Loading…
x
Reference in New Issue
Block a user