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

Function GetObjectAddr

extensions/dhooks/util.cpp:34–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "util.h"
33
34void * GetObjectAddr(HookParamType type, unsigned int flags, void **params, size_t offset)
35{
36#ifdef WIN32
37 if (type == HookParamType_Object)
38 return (void *)((intptr_t)params + offset);
39#elif POSIX
40 if (type == HookParamType_Object && !(flags & PASSFLAG_ODTOR)) //Objects are passed by rrefrence if they contain destructors.
41 return (void *)((intptr_t)params + offset);
42#endif
43 return *(void **)((intptr_t)params + offset);
44
45}
46
47size_t GetStackParamOffset(HookParamsStruct *paramStruct, unsigned int index)
48{

Callers 4

CallVFunctionFunction · 0.85
CallVFunction<SDKVector>Function · 0.85
CallVFunction<string_t>Function · 0.85
GetObjectAddrOrThisFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected