DataMapInit<CGasCan>
0x00539470 · 374 bytes · __cdecl
_Z11DataMapInitI7CGasCanEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CGasCan>(CGasCan*) */
datamap_t * DataMapInit<CGasCan>(CGasCan *param_1)
{
char *pcVar1;
int iVar2;
size_t sVar3;
char *local_10 [2];
if (DataMapInit<CGasCan>(CGasCan*)::nameHolder == '\0') {
iVar2 = __cxa_guard_acquire(&DataMapInit<CGasCan>(CGasCan*)::nameHolder);
if (iVar2 != 0) {
DataMapInit<CGasCan>(CGasCan*)::nameHolder = "CGasCan";
_DAT_00fad1b4 = 0;
_DAT_00fad1b8 = 0;
_DAT_00fad1bc = 0;
DAT_00fad1c0 = 0;
_DAT_00fad1c4 = 0;
_DAT_00fad1b0 = 7;
__cxa_guard_release(&DataMapInit<CGasCan>(CGasCan*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CGasCan>(CGasCan*)::nameHolder,&__dso_handle);
}
}
CGasCan::m_DataMap._12_4_ = CBaseBackpackItem::m_DataMap;
if (DataMapInit<CGasCan>(CGasCan*)::dataDesc == '\0') {
iVar2 = __cxa_guard_acquire(&DataMapInit<CGasCan>(CGasCan*)::dataDesc);
if (iVar2 != 0) {
DataMapInit<CGasCan>(CGasCan*)::dataDesc._84_4_ = eventFuncs;
/* try { // try from 005394e5 to 0053954f has its CatchHandler @ 005395f7 */
local_10[0] = operator_new__(_DAT_00fad1b0 + 0x13);
strcpy(local_10[0],DataMapInit<CGasCan>(CGasCan*)::nameHolder);
pcVar1 = local_10[0];
sVar3 = strlen(local_10[0]);
builtin_strncpy(pcVar1 + sVar3,"ClearDetonateTimer",0x13);
CUtlVector<char*,CUtlMemory<char*,int>>::InsertBefore
((CUtlVector<char*,CUtlMemory<char*,int>> *)&DAT_00fad1b4,DAT_00fad1c0,local_10);
DataMapInit<CGasCan>(CGasCan*)::dataDesc._132_4_ = local_10[0];
__cxa_guard_release(&DataMapInit<CGasCan>(CGasCan*)::dataDesc);
}
}
CGasCan::m_DataMap._4_4_ = 3;
CGasCan::m_DataMap._0_4_ = 0xf1d6e0;
return (datamap_t *)CGasCan::m_DataMap;
}
SourceMod gamedata
paste intoaddons/sourcemod/gamedata/<your_plugin>.txt
used as the SourceMod key — change to fit your plugin's convention
SourceMod library name (server / engine / matchmaking)
Just a Signatures{} block, ready to drop into a gamedata
file. Wire it up in your plugin however you like - SDKCall, DHooks,
raw memory ops, or anything else.
Signatures + Functions block. The plugin uses
DHookCreateFromConf - DHooks reads return type, this-type,
calling convention, and argument types straight from the gamedata. Less
boilerplate in the plugin, types travel with the gamedata.
Gamedata KeyValues
DHooks plugin example
Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.