DataMapInit<CGameWeaponManager>
0x006d1af0 · 409 bytes · __cdecl
_Z11DataMapInitI18CGameWeaponManagerEP9datamap_tPT_
Decompiled
datamap_t * (1 param)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* datamap_t* DataMapInit<CGameWeaponManager>(CGameWeaponManager*) */
datamap_t * DataMapInit<CGameWeaponManager>(CGameWeaponManager *param_1)
{
char *pcVar1;
int iVar2;
size_t sVar3;
char *local_10 [2];
if (DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder == '\0') {
iVar2 = __cxa_guard_acquire(&DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder);
if (iVar2 != 0) {
DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder = "CGameWeaponManager";
_DAT_00fe355c = 0;
_DAT_00fe3560 = 0;
_DAT_00fe3564 = 0;
DAT_00fe3568 = 0;
_DAT_00fe356c = 0;
_DAT_00fe3558 = 0x12;
__cxa_guard_release(&DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder);
__cxa_atexit(CDatadescGeneratedNameHolder::~CDatadescGeneratedNameHolder,
&DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder,&__dso_handle);
}
}
CGameWeaponManager::m_DataMap._12_4_ = CBaseEntity::m_DataMap;
if (DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::dataDesc == '\0') {
iVar2 = __cxa_guard_acquire(&DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::dataDesc);
if (iVar2 != 0) {
/* try { // try from 006d1b5b to 006d1bac has its CatchHandler @ 006d1c9f */
local_10[0] = operator_new__(_DAT_00fe3558 + 6);
strcpy(local_10[0],DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::nameHolder);
pcVar1 = local_10[0];
sVar3 = strlen(local_10[0]);
builtin_strncpy(pcVar1 + sVar3,"Think",6);
CUtlVector<char*,CUtlMemory<char*,int>>::InsertBefore
((CUtlVector<char*,CUtlMemory<char*,int>> *)&DAT_00fe355c,DAT_00fe3568,local_10);
DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::dataDesc._324_4_ = local_10[0];
if (CUtlVectorDataopsInstantiator<13>::
GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
::ops == '\0') {
iVar2 = __cxa_guard_acquire(&CUtlVectorDataopsInstantiator<13>::
GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
::ops);
if (iVar2 != 0) {
CUtlVectorDataopsInstantiator<13>::
GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
::ops = &PTR_Save_00c5bd28;
__cxa_guard_release(&CUtlVectorDataopsInstantiator<13>::
GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
::ops);
}
}
DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::dataDesc._532_4_ =
&CUtlVectorDataopsInstantiator<13>::
GetDataOps<CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>>(CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>*)
::ops;
__cxa_guard_release(&DataMapInit<CGameWeaponManager>(CGameWeaponManager*)::dataDesc);
}
}
CGameWeaponManager::m_DataMap._4_4_ = 8;
CGameWeaponManager::m_DataMap._0_4_ = 0xf3b960;
return (datamap_t *)CGameWeaponManager::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.