From cb39030cce45b1c70e4622fba191c15016e767a9 Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Tue, 3 Jan 2017 12:39:32 -0500 Subject: [PATCH] Don't check handle ownership on Event.FireToClient The handle does not get mutated here, so it is safe. Since we don't currently support cloning event handles or copying events, this also facilitates the only easy way of firing an existing game- created event to a client. --- core/smn_events.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/core/smn_events.cpp b/core/smn_events.cpp index 2fc3a31c..3ba34178 100644 --- a/core/smn_events.cpp +++ b/core/smn_events.cpp @@ -160,12 +160,6 @@ static cell_t sm_FireEventToClient(IPluginContext *pContext, const cell_t *param return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err); } - /* If identities do not match, don't fire event */ - if (pContext->GetIdentity() != pInfo->pOwner) - { - return pContext->ThrowNativeError("Game event \"%s\" could not be fired because it was not created by this plugin", pInfo->pEvent->GetName()); - } - if (pInfo->bDontBroadcast) { return pContext->ThrowNativeError("Game event \"%s\" is set to not be broadcasted to clients", pInfo->pEvent->GetName());