CDmxElement::RemoveAttributeByPtr
0x00be7e20 · 106 bytes · __thiscall
_ZN11CDmxElement20RemoveAttributeByPtrEP13CDmxAttribute
Decompiled
undefined (2 params)
/* CDmxElement::RemoveAttributeByPtr(CDmxAttribute*) */
void __thiscall CDmxElement::RemoveAttributeByPtr(CDmxElement *this,CDmxAttribute *param_1)
{
CDmxAttribute *pCVar1;
int iVar2;
this[0x2e] = (CDmxElement)((char)this[0x2e] + '\x01');
if (0 < *(int *)(this + 0xc)) {
iVar2 = 0;
pCVar1 = (CDmxAttribute *)**(int **)this;
while (pCVar1 != param_1) {
iVar2 = iVar2 + 1;
if (iVar2 == *(int *)(this + 0xc)) goto LAB_00be7e54;
pCVar1 = (CDmxAttribute *)(*(int **)this)[iVar2];
}
if (param_1 != (CDmxAttribute *)0x0) {
CDmxAttribute::~CDmxAttribute(param_1);
}
/* try { // try from 00be7e8b to 00be7e8f has its CatchHandler @ 00be7e96 */
CUtlVector<CDmxAttribute*,CUtlMemory<CDmxAttribute*,int>>::ShiftElementsLeft
((CUtlVector<CDmxAttribute*,CUtlMemory<CDmxAttribute*,int>> *)this,iVar2,1);
*(int *)(this + 0xc) = *(int *)(this + 0xc) + -1;
}
LAB_00be7e54:
LockForChanges(this,false);
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.