diff --git a/core/smn_datapacks.cpp b/core/smn_datapacks.cpp index a73dd251..51e8bd1b 100644 --- a/core/smn_datapacks.cpp +++ b/core/smn_datapacks.cpp @@ -25,7 +25,16 @@ class DataPackNatives : public: void OnSourceModAllInitialized() { - g_DataPackType = g_HandleSys.CreateType("DataPack", this, 0, NULL, NULL, g_pCoreIdent, NULL); + HandleAccess hacc; + TypeAccess tacc; + + g_HandleSys.InitAccessDefaults(&tacc, &hacc); + tacc.access[HTypeAccess_Create] = true; + tacc.access[HTypeAccess_Inherit] = true; + tacc.ident = g_pCoreIdent; + hacc.access[HandleAccess_Read] = HANDLE_RESTRICT_OWNER; + + g_DataPackType = g_HandleSys.CreateType("DataPack", this, 0, &tacc, &hacc, g_pCoreIdent, NULL); } void OnSourceModShutdown() { diff --git a/public/ISourceMod.h b/public/ISourceMod.h index 69c1596c..2d951b04 100644 --- a/public/ISourceMod.h +++ b/public/ISourceMod.h @@ -139,15 +139,10 @@ namespace SourceMod virtual void FreeDataPack(IDataPack *pack) =0; /** - * @brief Returns the automated data pack handle type. + * @brief Not implemented, do not use. * - * The read-only data type is the parent of the writable type. - * Note that calling CloseHandle() on either type will release the data pack. - * The read-only type is inheritable, but due to limitations of the Handle System, - * the writable type is not. - * - * @param readonly If true, the read-only type will be returned. - * @return The Handle type for storing generic data packs. + * @param readonly Ignored + * @return 0 */ virtual HandleType_t GetDataPackHandleType(bool readonly=false) =0;