CDmxElementDictionary::AddAttribute
0x00bed330 · 165 bytes · __thiscall
_ZN21CDmxElementDictionary12AddAttributeEP13CDmxAttributeRK10UniqueId_t
Decompiled
undefined (3 params)
/* CDmxElementDictionary::AddAttribute(CDmxAttribute*, UniqueId_t const&) */
void __thiscall
CDmxElementDictionary::AddAttribute
(CDmxElementDictionary *this,CDmxAttribute *param_1,UniqueId_t *param_2)
{
int iVar1;
int iVar2;
int iVar3;
iVar3 = *(int *)(this + 0x20);
iVar1 = iVar3 + 1;
if (*(int *)(this + 0x18) < iVar1) {
CUtlMemory<CDmxElementDictionary::AttributeInfo_t,int>::Grow
((CUtlMemory<CDmxElementDictionary::AttributeInfo_t,int> *)(this + 0x14),
iVar1 - *(int *)(this + 0x18));
iVar1 = *(int *)(this + 0x20) + 1;
}
iVar2 = *(int *)(this + 0x14);
*(int *)(this + 0x20) = iVar1;
iVar1 = (iVar1 - iVar3) + -1;
*(int *)(this + 0x24) = iVar2;
if (0 < iVar1) {
_V_memmove((void *)(iVar2 + 0x18 + iVar3 * 0x18),(void *)(iVar2 + iVar3 * 0x18),iVar1 * 0x18);
iVar2 = *(int *)(this + 0x14);
}
iVar3 = iVar3 * 0x18;
*(undefined1 *)(iVar2 + 4 + iVar3) = 1;
*(CDmxAttribute **)(*(int *)(this + 0x14) + iVar3) = param_1;
CopyUniqueId(param_2,(UniqueId_t *)(iVar3 + *(int *)(this + 0x14) + 8));
return;
}
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.