DataMapInit<CTriggerActiveWeaponDetect>
0x00b1d4a0 · 578 bytes · __cdecl
_Z11DataMapInitI26CTriggerActiveWeaponDetectEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*) */
datamap_t * DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect *param_1)
{
int iVar1;
char *__dest;
char *pcVar2;
int iVar3;
int iVar4;
if ((DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::nameHolder == '\0') &&
(iVar1 = __cxa_guard_acquire(&DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)
::nameHolder), iVar1 != 0)) {
DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::nameHolder =
"CTriggerActiveWeaponDetect";
DAT_010346d8 = (void *)0x0;
DAT_010346dc = 0;
DAT_010346e0 = 0;
DAT_010346e4 = 0;
_DAT_010346e8 = (void *)0x0;
_DAT_010346d4 = 0x1a;
__cxa_guard_release(&DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::
nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::nameHolder,
&__dso_handle);
}
CTriggerActiveWeaponDetect::m_DataMap._12_4_ = CBaseTrigger::m_DataMap;
if ((DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::dataDesc != '\0') ||
(iVar1 = __cxa_guard_acquire(&DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)
::dataDesc), iVar1 == 0)) goto LAB_00b1d4c9;
/* try { // try from 00b1d50b to 00b1d649 has its CatchHandler @ 00b1d6f9 */
__dest = operator_new__(_DAT_010346d4 + 0x12);
pcVar2 = stpcpy(__dest,DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::
nameHolder);
builtin_strncpy(pcVar2,"ActiveWeaponThink",0x12);
iVar3 = DAT_010346e4;
iVar1 = DAT_010346e4 + 1;
if ((DAT_010346dc < iVar1) && (-1 < DAT_010346e0)) {
if (DAT_010346e0 == 0) {
if (DAT_010346dc == 0) {
if (iVar1 < 9) {
DAT_010346dc = 8;
goto LAB_00b1d68f;
}
DAT_010346dc = 8;
}
do {
DAT_010346dc = DAT_010346dc * 2;
} while (DAT_010346dc < iVar1);
}
else {
for (DAT_010346dc = (DAT_010346e4 / DAT_010346e0 + 1) * DAT_010346e0; DAT_010346dc < iVar1;
DAT_010346dc = (DAT_010346dc + iVar1) / 2) {
}
}
LAB_00b1d68f:
if (DAT_010346d8 == (void *)0x0) {
DAT_010346d8 = malloc(DAT_010346dc << 2);
}
else {
DAT_010346d8 = realloc(DAT_010346d8,DAT_010346dc << 2);
iVar1 = DAT_010346e4 + 1;
}
}
iVar4 = iVar3 * 4;
iVar3 = (iVar1 - iVar3) + -1;
DAT_010346e4 = iVar1;
_DAT_010346e8 = DAT_010346d8;
if (0 < iVar3) {
_V_memmove((void *)((int)DAT_010346d8 + iVar4 + 4),(void *)((int)DAT_010346d8 + iVar4),iVar3 * 4
);
}
if ((undefined4 *)(iVar4 + (int)DAT_010346d8) != (undefined4 *)0x0) {
*(undefined4 *)(iVar4 + (int)DAT_010346d8) = __dest;
}
DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::dataDesc._212_4_ =
eventFuncs;
DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::dataDesc._132_4_ = __dest;
__cxa_guard_release(&DataMapInit<CTriggerActiveWeaponDetect>(CTriggerActiveWeaponDetect*)::
dataDesc);
LAB_00b1d4c9:
CTriggerActiveWeaponDetect::m_DataMap._4_4_ = 3;
CTriggerActiveWeaponDetect::m_DataMap._0_4_ = 0xf633a0;
return (datamap_t *)CTriggerActiveWeaponDetect::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.