From 85384bcb11287dc33339424ca39c6dc35f517d5c Mon Sep 17 00:00:00 2001 From: s1lentq Date: Mon, 20 Jun 2016 02:08:56 +0700 Subject: [PATCH] Fix #14 --- reapi/src/natives/natives_misc.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reapi/src/natives/natives_misc.cpp b/reapi/src/natives/natives_misc.cpp index f15fce7..f35f255 100644 --- a/reapi/src/natives/natives_misc.cpp +++ b/reapi/src/natives/natives_misc.cpp @@ -211,7 +211,7 @@ cell AMX_NATIVE_CALL rg_multidmg_clear(AMX *amx, cell *params) } /* -* inflicts contents of global multi damage register on victim +* Inflicts contents of global multi damage register on victim * * @param inflictor Inflictor is the entity that caused the damage (such as a gun) * @param attacker Attacker is the entity that tirggered the damage (such as the gun's owner). @@ -1621,14 +1621,14 @@ cell AMX_NATIVE_CALL rh_emit_sound2(AMX *amx, cell *params) { enum args_e { arg_count, arg_entity, arg_recipient, arg_channel, arg_sample, arg_vol, arg_attn, arg_flags, arg_pitch, arg_emitFlags, arg_origin }; - CBasePlayer *pRecipient = getPrivate(params[arg_recipient]); + CBaseEntity *pRecipient = getPrivate(params[arg_recipient]); if (pRecipient != nullptr && pRecipient->has_disconnected) { MF_LogError(amx, AMX_ERR_NATIVE, "%s: player %i is not connected", __FUNCTION__, params[arg_recipient]); return FALSE; } - // ignore bots - if ((pRecipient != nullptr && pRecipient->IsBot()) || !pRecipient->IsNetClient()) { + // ignore recipient of non-player + if (params[arg_recipient] != 0 && pRecipient && !pRecipient->IsNetClient()) { return FALSE; }