CParticleSystemDictionary::AddParticleSystem
0x00bd33c0 · 1344 bytes · __thiscall
_ZN25CParticleSystemDictionary17AddParticleSystemEP11CDmxElement
Decompiled
undefined (2 params)
/* CParticleSystemDictionary::AddParticleSystem(CDmxElement*) */
CParticleSystemDefinition * __thiscall
CParticleSystemDictionary::AddParticleSystem(CParticleSystemDictionary *this,CDmxElement *param_1)
{
undefined4 *puVar1;
char *pcVar2;
int iVar3;
CParticleSystemDefinition *this_00;
int *piVar4;
uint uVar5;
ushort local_1e [7];
pcVar2 = (char *)CDmxElement::GetTypeString(param_1);
iVar3 = _V_stricmp(pcVar2,"DmeParticleSystemDefinition");
if (iVar3 != 0) {
return (CParticleSystemDefinition *)0x0;
}
DestroyExistingElement(this,param_1);
this_00 = ::operator_new(0x420);
*(undefined4 *)this_00 = 0;
/* try { // try from 00bd3433 to 00bd3437 has its CatchHandler @ 00bd39a5 */
CMaterialReference::CMaterialReference
((CMaterialReference *)(this_00 + 0x144),(char *)0x0,(char *)0x0,true);
*(undefined4 *)(this_00 + 0x27c) = 0;
*(undefined4 *)(this_00 + 0x278) = 0;
*(undefined4 *)(this_00 + 0x280) = 0;
*(undefined4 *)(this_00 + 0x284) = 0;
*(undefined2 *)(this_00 + 700) = 0xffff;
/* try { // try from 00bd3475 to 00bd3479 has its CatchHandler @ 00bd390c */
CUtlString::CUtlString((CUtlString *)(this_00 + 0x2f8));
*(undefined4 *)(this_00 + 0x308) = 0;
*(undefined4 *)(this_00 + 0x30c) = 0;
*(undefined4 *)(this_00 + 0x310) = 0;
*(undefined4 *)(this_00 + 0x314) = 0;
*(undefined4 *)(this_00 + 0x318) = 0;
*(undefined4 *)(this_00 + 0x31c) = 0;
*(undefined4 *)(this_00 + 800) = 0;
*(undefined4 *)(this_00 + 0x324) = 0;
*(undefined4 *)(this_00 + 0x328) = 0;
*(undefined4 *)(this_00 + 0x32c) = 0;
*(undefined4 *)(this_00 + 0x330) = 0;
*(undefined4 *)(this_00 + 0x334) = 0;
*(undefined4 *)(this_00 + 0x338) = 0;
*(undefined4 *)(this_00 + 0x33c) = 0;
*(undefined4 *)(this_00 + 0x340) = 0;
*(undefined4 *)(this_00 + 0x344) = 0;
*(undefined4 *)(this_00 + 0x348) = 0;
*(undefined4 *)(this_00 + 0x34c) = 0;
*(undefined4 *)(this_00 + 0x350) = 0;
*(undefined4 *)(this_00 + 0x354) = 0;
*(undefined4 *)(this_00 + 0x358) = 0;
*(undefined4 *)(this_00 + 0x35c) = 0;
*(undefined4 *)(this_00 + 0x360) = 0;
*(undefined4 *)(this_00 + 0x364) = 0;
*(undefined4 *)(this_00 + 0x368) = 0;
*(undefined4 *)(this_00 + 0x36c) = 0;
*(undefined4 *)(this_00 + 0x370) = 0;
*(undefined4 *)(this_00 + 0x374) = 0;
*(undefined4 *)(this_00 + 0x378) = 0;
*(undefined4 *)(this_00 + 0x37c) = 0;
*(undefined4 *)(this_00 + 0x380) = 0;
*(undefined4 *)(this_00 + 900) = 0;
*(undefined4 *)(this_00 + 0x388) = 0;
*(undefined4 *)(this_00 + 0x38c) = 0;
*(undefined4 *)(this_00 + 0x410) = 0;
*(undefined4 *)(this_00 + 0x390) = 0;
*(undefined4 *)(this_00 + 0x394) = 0;
*(undefined4 *)(this_00 + 0x398) = 0;
*(undefined4 *)(this_00 + 0x39c) = 0;
*(undefined4 *)(this_00 + 0x3a0) = 0;
*(undefined4 *)(this_00 + 0x3a4) = 0;
*(undefined4 *)(this_00 + 0x3a8) = 0;
*(undefined4 *)(this_00 + 0x3ac) = 0;
*(undefined4 *)(this_00 + 0x3b0) = 0;
*(undefined4 *)(this_00 + 0x3b4) = 0;
*(undefined4 *)(this_00 + 0x3b8) = 0;
*(undefined4 *)(this_00 + 0x3bc) = 0;
*(undefined4 *)(this_00 + 0x3c0) = 0;
*(undefined4 *)(this_00 + 0x3c4) = 0;
*(undefined4 *)(this_00 + 0x3c8) = 0;
*(undefined4 *)(this_00 + 0x3cc) = 0;
*(undefined4 *)(this_00 + 0x3d0) = 0;
*(undefined4 *)(this_00 + 0x3d4) = 0;
*(undefined4 *)(this_00 + 0x3d8) = 0;
*(undefined4 *)(this_00 + 0x3dc) = 0;
*(undefined4 *)(this_00 + 0x3e0) = 0;
*(undefined4 *)(this_00 + 0x3e4) = 0;
*(undefined4 *)(this_00 + 1000) = 0;
*(undefined4 *)(this_00 + 0x3ec) = 0;
*(undefined4 *)(this_00 + 0x3f0) = 0;
*(undefined4 *)(this_00 + 0x3f4) = 0;
*(undefined4 *)(this_00 + 0x3f8) = 0;
*(undefined4 *)(this_00 + 0x3fc) = 0;
*(undefined4 *)(this_00 + 0x400) = 0;
*(undefined4 *)(this_00 + 0x404) = 0;
*(undefined4 *)(this_00 + 0x408) = 0;
*(undefined4 *)(this_00 + 0x414) = 0;
*(undefined4 *)(this_00 + 0x148) = 0x3f800000;
*(undefined2 *)(this_00 + 700) = 0xffff;
*(undefined4 *)(this_00 + 0x14c) = 0x3f800000;
*(undefined4 *)(this_00 + 0x150) = 0x3f800000;
*(undefined4 *)(this_00 + 0x154) = 0x3f800000;
this_00[0x2c1] = (CParticleSystemDefinition)0x0;
*(undefined4 *)(this_00 + 0x18) = 0;
*(undefined4 *)(this_00 + 0x1c) = 0;
*(undefined4 *)(this_00 + 0x20) = 0;
*(undefined4 *)(this_00 + 0x24) = 0;
*(undefined4 *)(this_00 + 0x10) = 0;
*(undefined4 *)(this_00 + 0xc) = 0;
*(undefined4 *)(this_00 + 8) = 0;
*(undefined4 *)(this_00 + 0x14) = 0;
LOCK();
*(undefined4 *)(this_00 + 0x410) = 0;
UNLOCK();
LOCK();
*(undefined4 *)(this_00 + 0x414) = 0;
UNLOCK();
this_00[0x41e] = (CParticleSystemDefinition)((byte)this_00[0x41e] & 0xfc);
*(undefined4 *)(this_00 + 0x418) = 0;
this_00[0x41d] = (CParticleSystemDefinition)0x0;
this_00[0x41c] = (CParticleSystemDefinition)0x1;
*(undefined4 *)(this_00 + 0x158) = 0;
*(undefined4 *)(this_00 + 0x1dc) = 0;
*(undefined4 *)(this_00 + 0x1e0) = 0x3f800000;
*(undefined4 *)(this_00 + 0x1e8) = 0;
*(undefined4 *)(this_00 + 0x274) = 0;
this_00[0x2c0] = (CParticleSystemDefinition)0x1;
*(undefined4 *)(this_00 + 0x1ec) = 0;
*(undefined4 *)(this_00 + 0x2ac) = 0;
*(undefined4 *)(this_00 + 0x40c) = 0;
piVar4 = (int *)CDmxElement::GetAttribute(param_1,"preventNameBasedLookup");
if (piVar4 == (int *)0x0) {
CDmxElement::GetValue<bool>(char_const*)::defaultValue = 0;
}
else if (*piVar4 == 4) {
if (*(char *)piVar4[2] != '\0') {
iVar3 = *(int *)(this + 0x58);
CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>>::GrowVector
((CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>>
*)(this + 0x4c),1);
CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>>::
ShiftElementsRight((CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>>
*)(this + 0x4c),iVar3,1);
puVar1 = (undefined4 *)(*(int *)(this + 0x4c) + iVar3 * 4);
if (puVar1 != (undefined4 *)0x0) {
*puVar1 = this_00;
}
goto LAB_00bd3885;
}
}
else {
CDmxAttribute::GetValue<bool>()::defaultValue = 0;
}
CDmxElement::GetName(param_1);
CUtlSymbolTable::AddString((char *)local_1e);
uVar5 = (uint)local_1e[0];
if (*(int *)(this + 0xc) <= (int)uVar5) {
CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>>::EnsureCount
((CUtlVector<CParticleSystemDefinition*,CUtlMemory<CParticleSystemDefinition*,int>> *)
this,uVar5 + 1);
}
*(CParticleSystemDefinition **)(*(int *)this + uVar5 * 4) = this_00;
LAB_00bd3885:
CParticleSystemDefinition::Read(this_00,param_1);
return this_00;
}
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.