MCPcopy Create free account
hub / github.com/alliedmodders/sourcemod / CreateIdentity

Method CreateIdentity

core/logic/ShareSys.cpp:126–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126IdentityToken_t *ShareSystem::CreateIdentity(IdentityType_t type, void *ptr)
127{
128 if (!m_TypeRoot)
129 {
130 return 0;
131 }
132
133 /* :TODO: Cache? */
134 IdentityToken_t *pToken = new IdentityToken_t;
135
136 HandleSecurity sec;
137 sec.pOwner = sec.pIdentity = GetIdentRoot();
138
139 pToken->ident = g_HandleSys.CreateHandleInt(type, NULL, &sec, NULL, NULL, true);
140 pToken->ptr = ptr;
141 pToken->type = type;
142
143 return pToken;
144}
145
146bool ShareSystem::AddInterface(IExtension *myself, SMInterface *iface)
147{

Callers 2

InitIdentityMethod · 0.45
SDK_OnLoadMethod · 0.45

Calls 1

CreateHandleIntMethod · 0.80

Tested by

no test coverage detected