mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
Pass cl.viewentity into S_StartSound for pfnPlaySoundByNameAtLocation
This fixes a minor bug where sounds played via pfnPlaySoundByNameAtLocation (mainly from viewmodel animations e.g. MP5) would be left where it was emitted in the world, rather than following the local player as it does in Goldsrc.
This commit is contained in:
parent
03668116d7
commit
5cdb35f508
@ -2228,7 +2228,7 @@ static pmtrace_t *pfnTraceLine( float *start, float *end, int flags, int usehull
|
||||
static void GAME_EXPORT pfnPlaySoundByNameAtLocation( char *szSound, float volume, float *origin )
|
||||
{
|
||||
int hSound = S_RegisterSound( szSound );
|
||||
S_StartSound( origin, 0, CHAN_AUTO, hSound, volume, ATTN_NORM, PITCH_NORM, 0 );
|
||||
S_StartSound( origin, cl.viewentity, CHAN_AUTO, hSound, volume, ATTN_NORM, PITCH_NORM, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user