Exposed EmitSound_t and related constants to VScript and added hooks for modifying an entity's emitted sounds on both the server and client

This commit is contained in:
Blixibon
2021-09-19 14:52:18 -05:00
parent 55e75529bb
commit 62f4d6f872
8 changed files with 204 additions and 3 deletions

View File

@@ -1450,6 +1450,13 @@ void CBaseEntity::EmitSentenceByIndex( IRecipientFilter& filter, int iEntIndex,
soundOrigins );
if ( bSwallowed )
return;
CBaseEntity *pEntity = UTIL_EntityByIndex( iEntIndex );
if ( pEntity )
{
pEntity->ModifySentenceParams( iSentenceIndex, iChannel, flVolume, iSoundlevel, iFlags, iPitch,
&pOrigin, &pDirection, bUpdatePositions, soundtime, iSpecialDSP, iSpeakerIndex );
}
enginesound->EmitSentenceByIndex( filter, iEntIndex, iChannel, iSentenceIndex,
flVolume, iSoundlevel, iFlags, iPitch * GetSoundPitchScale(), iSpecialDSP, pOrigin, pDirection, &soundOrigins, bUpdatePositions, soundtime, iSpeakerIndex );