CParticleSystemDefinition::WriteChildren
0x00bd1f90 · 525 bytes · __thiscall
_ZN25CParticleSystemDefinition13WriteChildrenEP11CDmxElement
Decompiled
undefined (2 params)
/* CParticleSystemDefinition::WriteChildren(CDmxElement*) */
void __thiscall
CParticleSystemDefinition::WriteChildren(CParticleSystemDefinition *this,CDmxElement *param_1)
{
undefined4 *puVar1;
int iVar2;
CDmxElement *pCVar3;
CDmxAttribute *pCVar4;
char *pcVar5;
CDmxElement *this_00;
UniqueId_t *pUVar6;
CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *this_01;
int iVar7;
CDmxElement *local_20 [4];
CDmxElement::LockForChanges(param_1,true);
/* try { // try from 00bd1fba to 00bd2068 has its CatchHandler @ 00bd21a2 */
pCVar4 = (CDmxAttribute *)CDmxElement::AddAttribute(param_1,"children");
if (*(int *)pCVar4 != 0xf) {
CDmxAttribute::AllocateDataMemory(pCVar4,0xf);
puVar1 = *(undefined4 **)(pCVar4 + 8);
this_01 = (CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> *)0x0;
if (puVar1 == (undefined4 *)0x0) goto LAB_00bd2002;
*puVar1 = 0;
puVar1[1] = 0;
puVar1[2] = 0;
puVar1[3] = 0;
puVar1[4] = 0;
}
this_01 = *(CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>> **)(pCVar4 + 8);
LAB_00bd2002:
iVar2 = *(int *)(this + 0x38c);
if (0 < iVar2) {
iVar7 = 0;
do {
/* try { // try from 00bd2108 to 00bd2178 has its CatchHandler @ 00bd21a2 */
local_20[0] = (CDmxElement *)CreateDmxElement("DmeParticleChild");
CUtlVector<CDmxElement*,CUtlMemory<CDmxElement*,int>>::InsertBefore
(this_01,*(int *)(this_01 + 0xc),local_20);
CDmxElement::AddAttributesFromStructure
(*(CDmxElement **)(*(int *)this_01 + iVar7 * 4),
(void *)(*(int *)(this + 0x380) + iVar7 * 0x1c),s_ChildrenInfoUnpack);
pUVar6 = (UniqueId_t *)(iVar7 * 0x1c + *(int *)(this + 0x380));
if (pUVar6[0x14] == (UniqueId_t)0x0) {
this_00 = (CDmxElement *)
CParticleSystemMgr::CreateParticleDmxElement
((CParticleSystemMgr *)g_pParticleSystemMgr,pUVar6);
}
else {
CParticleSystemMgr::GetParticleSystemNameFromIndex
((CParticleSystemMgr *)g_pParticleSystemMgr,*(int *)(pUVar6 + 0x10));
this_00 = (CDmxElement *)CParticleSystemMgr::CreateParticleDmxElement(g_pParticleSystemMgr);
}
pcVar5 = (char *)CDmxElement::GetName(this_00);
pCVar3 = local_20[0];
CDmxElement::LockForChanges(local_20[0],true);
/* try { // try from 00bd2074 to 00bd2087 has its CatchHandler @ 00bd21e0 */
pCVar4 = (CDmxAttribute *)CDmxElement::AddAttribute(pCVar3,"name");
CDmxAttribute::SetValue(pCVar4,pcVar5);
if (pCVar3 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(pCVar3,false);
}
pCVar3 = local_20[0];
/* try { // try from 00bd20aa to 00bd20ae has its CatchHandler @ 00bd21a2 */
CDmxElement::LockForChanges(local_20[0],true);
/* try { // try from 00bd20ba to 00bd20d1 has its CatchHandler @ 00bd21c6 */
pCVar4 = (CDmxAttribute *)CDmxElement::AddAttribute(pCVar3,"child");
CDmxAttribute::AllocateDataMemory(pCVar4,1);
if (*(undefined4 **)(pCVar4 + 8) != (undefined4 *)0x0) {
**(undefined4 **)(pCVar4 + 8) = this_00;
}
if (pCVar3 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(pCVar3,false);
}
iVar7 = iVar7 + 1;
} while (iVar7 != iVar2);
}
if (param_1 != (CDmxElement *)0x0) {
CDmxElement::LockForChanges(param_1,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.