- 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:
David Anderson 2007-05-29 08:30:13 +00:00
parent c1c293ccc4
commit be634bb027
4 changed files with 12 additions and 5 deletions

View File

@ -353,7 +353,7 @@ bool EventManager::OnFireEvent(IGameEvent *pEvent, bool bDontBroadcast)
pForward->PushCell(bDontBroadcast);
pForward->Execute(&res, NULL);
HandleSecurity sec = { NULL, g_pCoreIdent };
HandleSecurity sec(NULL, g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
}
@ -407,7 +407,7 @@ bool EventManager::OnFireEvent_Post(IGameEvent *pEvent, bool bDontBroadcast)
if (pHook->postCopy)
{
/* Free handle */
HandleSecurity sec = { NULL, g_pCoreIdent };
HandleSecurity sec(NULL, g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
/* Free event structure */

View File

@ -123,7 +123,7 @@ static cell_t sm_FireEvent(IPluginContext *pContext, const cell_t *params)
g_EventManager.FireEvent(pInfo, params[2] ? true : false);
/* Free handle on game event */
HandleSecurity sec = {pContext->GetIdentity(), g_pCoreIdent};
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
return 1;
@ -150,7 +150,7 @@ static cell_t sm_CancelCreatedEvent(IPluginContext *pContext, const cell_t *para
g_EventManager.CancelCreatedEvent(pInfo);
/* Free handle on game event */
HandleSecurity sec = {pContext->GetIdentity(), g_pCoreIdent};
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
return 1;

View File

@ -14,7 +14,7 @@
#include <stdio.h>
#include <string.h>
#include "PluginSys.h"
#include "sp_vm_function.h"
/********************
* FUNCTION CALLING *

View File

@ -157,6 +157,13 @@ namespace SourceMod
*/
struct HandleSecurity
{
HandleSecurity()
{
}
HandleSecurity(IdentityToken_t *owner, IdentityToken_t *identity)
: pOwner(owner), pIdentity(identity)
{
}
IdentityToken_t *pOwner; /**< Owner of the Handle */
IdentityToken_t *pIdentity; /**< Owner of the Type */
};