mirror of
https://github.com/Haze1337/Sound-Manager.git
synced 2025-12-06 18:08:34 +00:00
get sample from ambient sound (#7)
This commit is contained in:
parent
0bcaf21b3f
commit
c3c8c97d5d
@ -187,6 +187,18 @@ public Action OnPlayerRunCmd(int client)
|
||||
{
|
||||
char sSound[PLATFORM_MAX_PATH];
|
||||
GetEntPropString(entity, Prop_Data, "m_iszSound", sSound, PLATFORM_MAX_PATH);
|
||||
|
||||
int channel = SNDCHAN_STATIC;
|
||||
int level = SNDLEVEL_NONE;
|
||||
float volume = 0.0;
|
||||
int pitch = SNDPITCH_NORMAL;
|
||||
char sSample[PLATFORM_MAX_PATH];
|
||||
|
||||
if (GetGameSoundParams(sSound, channel, level, volume, pitch, sSample, sizeof(sSample), entity))
|
||||
{
|
||||
sSound = sSample;
|
||||
}
|
||||
|
||||
EmitSoundToClient(client, sSound, entity, SNDCHAN_STATIC, SNDLEVEL_NONE, SND_STOP, 0.0, SNDPITCH_NORMAL, _, _, _, true);
|
||||
|
||||
if(gI_Settings[client] & Debug)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user