From 9cd90838e1bd74984731a17c2045cf9f006a189c Mon Sep 17 00:00:00 2001 From: Arkshine Date: Tue, 19 Aug 2014 09:04:09 +0200 Subject: [PATCH] Remove safety checks as it's not really necessary. --- dlls/cstrike/cstrike/CstrikeHacks.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/dlls/cstrike/cstrike/CstrikeHacks.cpp b/dlls/cstrike/cstrike/CstrikeHacks.cpp index 0bc4ec54..a631effd 100644 --- a/dlls/cstrike/cstrike/CstrikeHacks.cpp +++ b/dlls/cstrike/cstrike/CstrikeHacks.cpp @@ -73,17 +73,12 @@ const char *CMD_ARGV(int i) void OnEmitSound(edict_t *entity, int channel, const char *sample, float volume, float attenuation, int fFlags, int pitch) { - // If shield is blocked with CS_OnBuy, we need to block the pickup sound as well played right after. - // Why this sound is not contained in GiveShield()? + // If shield is blocked with CS_OnBuy, we need to block the pickup sound ("items/gunpickup2.wav") + // as well played right after. Why this sound is not contained in GiveShield()? g_pengfuncsTable->pfnEmitSound = NULL; - if (CurrentItemId == 0 && strcmp(sample, "items/gunpickup2.wav") == 0) // Safety checks. - { - RETURN_META(MRES_SUPERCEDE); - } - - RETURN_META(MRES_IGNORED); + RETURN_META(MRES_SUPERCEDE); } DETOUR_DECL_STATIC1(C_ClientCommand, void, edict_t*, pEdict) // void ClientCommand(edict_t *pEntity)