Permalink
Browse files

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.
1 parent 0aa1137 commit cb39030cce45b1c70e4622fba191c15016e767a9 @psychonic psychonic committed Jan 3, 2017
Showing with 0 additions and 6 deletions.
  1. +0 −6 core/smn_events.cpp
View
@@ -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());

0 comments on commit cb39030

Please sign in to comment.