CParticleSystemDefinition::Read
0x00bd4170 · 446 bytes · __thiscall
_ZN25CParticleSystemDefinition4ReadEP11CDmxElement
Decompiled
undefined (2 params)
/* CParticleSystemDefinition::Read(CDmxElement*) */
void __thiscall
CParticleSystemDefinition::Read(CParticleSystemDefinition *this,CDmxElement *param_1)
{
char *pcVar1;
UniqueId_t *pUVar2;
int iVar3;
byte bVar4;
int iVar5;
bool bVar6;
pcVar1 = (char *)CDmxElement::GetName(param_1);
CUtlString::operator=((CUtlString *)(this + 0x2f8),pcVar1);
pUVar2 = (UniqueId_t *)CDmxElement::GetId(param_1);
CopyUniqueId(pUVar2,(UniqueId_t *)(this + 0x2c8));
CDmxElement::UnpackIntoStructure(param_1,this,s_pParticleSystemDefinitionUnpack);
if (*(int *)(this + 4) < 0) {
*(undefined4 *)(this + 4) = 0;
}
iVar3 = *(int *)(this + 0x2e0);
if (iVar3 < 1) {
iVar3 = 1;
}
iVar5 = 5000;
if (iVar3 * g_nParticle_Multiplier < 0x1389) {
iVar5 = iVar3 * g_nParticle_Multiplier;
}
*(int *)(this + 0x2e0) = iVar5;
if (0.0 < *(float *)(this + 0x1dc)) {
bVar4 = (byte)*(uint *)(this + 0x1e4);
bVar6 = (*(uint *)(this + 0x1e4) & 0x20) == 0;
*(uint *)(this + 0x18) = *(uint *)(this + 0x18) | (uint)bVar6 << (bVar4 & 0x1f);
*(uint *)(this + 0x1c) = *(uint *)(this + 0x1c) | (uint)!bVar6 << (bVar4 & 0x1f);
}
ParseOperators(this,"renderers",0,param_1,this + 0x31c);
ParseOperators(this,"operators",1,param_1,this + 0x308);
ParseOperators(this,"initializers",2,param_1,this + 0x330);
ParseOperators(this,"emitters",3,param_1,this + 0x344);
ParseChildren(this,param_1);
ParseOperators(this,"forces",5,param_1,this + 0x358);
ParseOperators(this,"constraints",6,param_1,this + 0x36c);
SetupContextData(this);
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.