- the handle system now lets you create HandleSecurity structs easier, but source compatibility is broken (using the old syntax wasn't really good C++ anyway!)
- fixed VM including PluginSys for some reason --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40863
This commit is contained in:
parent
c1c293ccc4
commit
be634bb027
@ -353,7 +353,7 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
|
|||||||
pForward->PushCell(bDontBroadcast);
|
pForward->PushCell(bDontBroadcast);
|
||||||
pForward->Execute(&res, NULL);
|
pForward->Execute(&res, NULL);
|
||||||
|
|
||||||
HandleSecurity sec = { NULL, g_pCoreIdent };
|
HandleSecurity sec(NULL, g_pCoreIdent);
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
g_HandleSys.FreeHandle(hndl, &sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -407,7 +407,7 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
|
|||||||
if (pHook->postCopy)
|
if (pHook->postCopy)
|
||||||
{
|
{
|
||||||
/* Free handle */
|
/* Free handle */
|
||||||
HandleSecurity sec = { NULL, g_pCoreIdent };
|
HandleSecurity sec(NULL, g_pCoreIdent);
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
g_HandleSys.FreeHandle(hndl, &sec);
|
||||||
|
|
||||||
/* Free event structure */
|
/* Free event structure */
|
||||||
|
@ -123,7 +123,7 @@ static cell_t sm_FireEvent(IPluginContext *pContext, const cell_t *params)
|
|||||||
g_EventManager.FireEvent(pInfo, params[2] ? true : false);
|
g_EventManager.FireEvent(pInfo, params[2] ? true : false);
|
||||||
|
|
||||||
/* Free handle on game event */
|
/* Free handle on game event */
|
||||||
HandleSecurity sec = {pContext->GetIdentity(), g_pCoreIdent};
|
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
g_HandleSys.FreeHandle(hndl, &sec);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
@ -150,7 +150,7 @@ static cell_t sm_CancelCreatedEvent(IPluginContext *pContext, const cell_t *para
|
|||||||
g_EventManager.CancelCreatedEvent(pInfo);
|
g_EventManager.CancelCreatedEvent(pInfo);
|
||||||
|
|
||||||
/* Free handle on game event */
|
/* Free handle on game event */
|
||||||
HandleSecurity sec = {pContext->GetIdentity(), g_pCoreIdent};
|
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
|
||||||
g_HandleSys.FreeHandle(hndl, &sec);
|
g_HandleSys.FreeHandle(hndl, &sec);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include "PluginSys.h"
|
#include "sp_vm_function.h"
|
||||||
|
|
||||||
/********************
|
/********************
|
||||||
* FUNCTION CALLING *
|
* FUNCTION CALLING *
|
||||||
|
@ -157,6 +157,13 @@ namespace SourceMod
|
|||||||
*/
|
*/
|
||||||
struct HandleSecurity
|
struct HandleSecurity
|
||||||
{
|
{
|
||||||
|
HandleSecurity()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
HandleSecurity(IdentityToken_t *owner, IdentityToken_t *identity)
|
||||||
|
: pOwner(owner), pIdentity(identity)
|
||||||
|
{
|
||||||
|
}
|
||||||
IdentityToken_t *pOwner; /**< Owner of the Handle */
|
IdentityToken_t *pOwner; /**< Owner of the Handle */
|
||||||
IdentityToken_t *pIdentity; /**< Owner of the Type */
|
IdentityToken_t *pIdentity; /**< Owner of the Type */
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user