Add support for Military Conflict: Vietnam (#1887)
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
|
||||
SH_DECL_HOOK8_void(IVEngineServer, EmitAmbientSound, SH_NOATTRIB, 0, int, const Vector &, const char *, float, soundlevel_t, int, int, float);
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
SH_DECL_HOOK18(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, void *);
|
||||
SH_DECL_HOOK18(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, void *);
|
||||
#elif SOURCE_ENGINE >= SE_PORTAL2
|
||||
@@ -316,7 +316,7 @@ uint32 GenerateSoundEntryHash(char const *pSoundEntry)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
int SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSoundEntry, unsigned int nSoundEntryHash, const char *pSample,
|
||||
float flVolume, soundlevel_t iSoundlevel, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
@@ -434,7 +434,7 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
|
||||
CellRecipientFilter crf;
|
||||
crf.Initialize(players, size);
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
RETURN_META_VALUE_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
-1,
|
||||
@@ -479,7 +479,7 @@ void SoundHooks::OnEmitSound(IRecipientFilter &filter, int iEntIndex, int iChann
|
||||
#endif
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
int SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChannel, const char *pSoundEntry, unsigned int nSoundEntryHash, const char *pSample,
|
||||
float flVolume, float flAttenuation, int nSeed, int iFlags, int iPitch, const Vector *pOrigin,
|
||||
const Vector *pDirection, CUtlVector<Vector> *pUtlVecOrigins, bool bUpdatePositions,
|
||||
@@ -598,7 +598,7 @@ void SoundHooks::OnEmitSound2(IRecipientFilter &filter, int iEntIndex, int iChan
|
||||
|
||||
CellRecipientFilter crf;
|
||||
crf.Initialize(players, size);
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
RETURN_META_VALUE_NEWPARAMS(
|
||||
MRES_IGNORED,
|
||||
-1,
|
||||
@@ -648,7 +648,7 @@ bool GetSoundParams(CSoundParameters *soundParams, const char *soundname, cell_t
|
||||
if ( !soundname[0] )
|
||||
return false;
|
||||
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
HSOUNDSCRIPTHASH index = soundemitterbase->HashSoundName(soundname);
|
||||
|
||||
if(!soundemitterbase->IsValidHash(index))
|
||||
@@ -661,7 +661,7 @@ bool GetSoundParams(CSoundParameters *soundParams, const char *soundname, cell_t
|
||||
#endif // SOURCE_ENGINE >= SE_PORTAL2
|
||||
if (!soundemitterbase->IsValidIndex(index))
|
||||
return false;
|
||||
#endif // SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#endif // SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
|
||||
gender_t gender = GENDER_NONE;
|
||||
|
||||
@@ -907,7 +907,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
player[0] = cl_array[i];
|
||||
crf.Reset();
|
||||
crf.Initialize(player, 1);
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
@@ -1085,7 +1085,7 @@ static cell_t EmitSound(IPluginContext *pContext, const cell_t *params)
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
SH_CALL(enginesoundPatch,
|
||||
@@ -1372,7 +1372,7 @@ static cell_t EmitSoundEntry(IPluginContext *pContext, const cell_t *params)
|
||||
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
SH_CALL(enginesoundPatch,
|
||||
static_cast<int (IEngineSound::*)(IRecipientFilter &, int, int, const char*, unsigned int, const char*, float,
|
||||
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int, void *)>
|
||||
@@ -1396,7 +1396,7 @@ SH_CALL(enginesoundPatch,
|
||||
else {
|
||||
if (g_InSoundHook)
|
||||
{
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE
|
||||
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
|
||||
SH_CALL(enginesoundPatch,
|
||||
static_cast<int (IEngineSound::*)(IRecipientFilter &, int, int, const char*, unsigned int, const char*, float,
|
||||
soundlevel_t, int, int, int, const Vector *, const Vector *, CUtlVector<Vector> *, bool, float, int, void *)>
|
||||
|
||||
Reference in New Issue
Block a user