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

Function VGetDataDescMap

core/smn_entities.cpp:215–234  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213
214class VEmptyClass {};
215datamap_t *VGetDataDescMap(CBaseEntity *pThisPtr, int offset)
216{
217 void **this_ptr = *reinterpret_cast<void ***>(&pThisPtr);
218 void **vtable = *reinterpret_cast<void ***>(pThisPtr);
219 void *vfunc = vtable[offset];
220
221 union
222 {
223 datamap_t *(VEmptyClass::*mfpnew)();
224#ifndef PLATFORM_POSIX
225 void *addr;
226 } u;
227 u.addr = vfunc;
228#else
229 struct
230 {
231 void *addr;
232 intptr_t adjustor;
233 } s;
234 } u;
235 u.s.addr = vfunc;
236 u.s.adjustor = 0;
237#endif

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected