Updated Core and SDK Tools for ep2v EmitSound sdk change.
This commit is contained in:
parent
06492d18a7
commit
3a77fcd005
@ -337,6 +337,9 @@ void BaseMenuStyle::ClientPressedKey(int client, unsigned int key_press)
|
||||
#endif
|
||||
0,
|
||||
PITCH_NORM,
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
0,
|
||||
#endif
|
||||
&pos);
|
||||
}
|
||||
}
|
||||
|
@ -528,7 +528,9 @@ static cell_t SlapPlayer(IPluginContext *pContext, const cell_t *params)
|
||||
CellRecipientFilter rf;
|
||||
rf.SetToReliable(true);
|
||||
rf.Initialize(player_list, total_players);
|
||||
#if SOURCE_ENGINE < SE_PORTAL2
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, 0, &pos);
|
||||
#elif SOURCE_ENGINE < SE_PORTAL2
|
||||
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, VOL_NORM, ATTN_NORM, 0, PITCH_NORM, &pos);
|
||||
#else
|
||||
engsound->EmitSound(rf, params[1], CHAN_AUTO, sound_name, -1, sound_name, VOL_NORM, ATTN_NORM, 0, 0, PITCH_NORM, &pos);
|
||||
|
@ -36,6 +36,9 @@ SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const
|
||||
#if SOURCE_ENGINE >= SE_PORTAL2
|
||||
SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 0, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
SH_DECL_HOOK17(IEngineSound, EmitSound, SH_NOATTRIB, 1, int, IRecipientFilter &, int, int, const char *, unsigned int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
SH_DECL_HOOK15_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
#else
|
||||
SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 0, IRecipientFilter &, int, int, const char *, float, float, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
SH_DECL_HOOK14_void(IEngineSound, EmitSound, SH_NOATTRIB, 1, IRecipientFilter &, int, int, const char *, float, soundlevel_t, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int);
|
||||
@ -262,6 +265,11 @@ int SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChanne
|
||||
float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#else
|
||||
void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
@ -318,6 +326,14 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
(crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, iSoundlevel, nSeed, iFlags, iPitch, pOrigin,
|
||||
pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float, soundlevel_t,
|
||||
int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>(&IEngineSound::EmitSound),
|
||||
(crf, iEntIndex, iChannel, buffer, flVolume, iSoundlevel, iFlags, iPitch, iSpecialDSP, pOrigin,
|
||||
pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#else
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
@ -341,6 +357,11 @@ int SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
float flVolume, float flAttenuation, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity)
|
||||
#else
|
||||
void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSample,
|
||||
float flVolume, float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
@ -398,6 +419,14 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
|
||||
(crf, iEntIndex, iChannel, buffer, -1, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
|
||||
nSeed, iFlags, iPitch, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char *, float, float,
|
||||
int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>(&IEngineSound::EmitSound),
|
||||
(crf, iEntIndex, iChannel, buffer, flVolume, SNDLVL_TO_ATTN(static_cast<soundlevel_t>(sndlevel)),
|
||||
iFlags, iPitch, iSpecialDSP, pOrigin, pDirection, pUtlVecOrigins, bUpdatePositions, soundtime, speakerentity)
|
||||
);
|
||||
#else
|
||||
RETURN_META_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
@ -654,6 +683,47 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float,
|
||||
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>
|
||||
(&IEngineSound::EmitSound))
|
||||
(crf,
|
||||
player[0],
|
||||
channel,
|
||||
sample,
|
||||
vol,
|
||||
(soundlevel_t)level,
|
||||
flags,
|
||||
pitch,
|
||||
0,
|
||||
pOrigin,
|
||||
pDir,
|
||||
pOrigVec,
|
||||
updatePos,
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
else
|
||||
{
|
||||
engsound->EmitSound(crf,
|
||||
player[0],
|
||||
channel,
|
||||
sample,
|
||||
vol,
|
||||
(soundlevel_t)level,
|
||||
flags,
|
||||
pitch,
|
||||
0,
|
||||
pOrigin,
|
||||
pDir,
|
||||
pOrigVec,
|
||||
updatePos,
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#else
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
@ -741,6 +811,47 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#elif SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
static_cast<void (IEngineSound::*)(IRecipientFilter &, int, int, const char*, float,
|
||||
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int)>
|
||||
(&IEngineSound::EmitSound))
|
||||
(crf,
|
||||
entity,
|
||||
channel,
|
||||
sample,
|
||||
vol,
|
||||
(soundlevel_t)level,
|
||||
flags,
|
||||
pitch,
|
||||
0,
|
||||
pOrigin,
|
||||
pDir,
|
||||
pOrigVec,
|
||||
updatePos,
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
else
|
||||
{
|
||||
engsound->EmitSound(crf,
|
||||
entity,
|
||||
channel,
|
||||
sample,
|
||||
vol,
|
||||
(soundlevel_t)level,
|
||||
flags,
|
||||
pitch,
|
||||
0,
|
||||
pOrigin,
|
||||
pDir,
|
||||
pOrigVec,
|
||||
updatePos,
|
||||
soundtime,
|
||||
speakerentity);
|
||||
}
|
||||
#else
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
|
@ -63,6 +63,17 @@ public:
|
||||
#else
|
||||
void OnEmitAmbientSound(int entindex, const Vector &pos, const char *samp, float vol,
|
||||
soundlevel_t soundlevel, int fFlags, int pitch, float delay);
|
||||
#if SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
|
||||
void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
|
||||
soundlevel_t iSoundlevel, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity);
|
||||
void OnEmitSound2(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
|
||||
float flAttenuation, int iFlags, int iPitch, int iSpecialDSP, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity);
|
||||
#else
|
||||
void OnEmitSound(IRecipientFilter& filter, int iEntIndex, int iChannel, const char *pSample, float flVolume,
|
||||
soundlevel_t iSoundlevel, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
@ -71,7 +82,8 @@ public:
|
||||
float flAttenuation, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
float soundtime, int speakerentity);
|
||||
#endif
|
||||
#endif // SOURCE_ENGINE == SE_ORANGEBOXVALVE
|
||||
#endif // SOURCE_ENGINE >= SE_PORTAL2
|
||||
private:
|
||||
size_t _FillInPlayers(int *pl_array, IRecipientFilter *pFilter);
|
||||
void _IncRefCounter(int type);
|
||||
|
Loading…
Reference in New Issue
Block a user