CParticleSystemDefinition::GetFallbackReplacementDefinition
0x00bd1990 · 249 bytes · __thiscall
_ZNK25CParticleSystemDefinition32GetFallbackReplacementDefinitionEv
Decompiled
undefined (1 param)
/* CParticleSystemDefinition::GetFallbackReplacementDefinition() const */
int * __thiscall
CParticleSystemDefinition::GetFallbackReplacementDefinition(CParticleSystemDefinition *this)
{
CParticleSystemDefinition *pCVar1;
int *piVar2;
int iVar3;
int *piVar4;
int *piVar5;
if (*(int *)(this + 0x270) < 1) {
piVar4 = (int *)0x0;
}
else {
piVar4 = *(int **)(this + 0x280);
if (*(int **)(this + 0x280) == (int *)0x0) {
piVar5 = (int *)CParticleSystemDictionary::FindParticleSystem
(*(char **)(g_pParticleSystemMgr + 0x8c));
pCVar1 = this + 0x278;
piVar2 = *(int **)(this + 0x280);
piVar4 = piVar5;
if (piVar5 != piVar2) {
if (piVar2 != (int *)0x0) {
if (*(undefined4 **)(this + 0x27c) == (undefined4 *)0x0) {
if (pCVar1 == (CParticleSystemDefinition *)*piVar2) {
iVar3 = *(int *)(this + 0x278);
*piVar2 = iVar3;
if (iVar3 != 0) {
*(undefined4 *)(iVar3 + 4) = 0;
}
}
}
else {
**(undefined4 **)(this + 0x27c) = *(undefined4 *)(this + 0x278);
if (*(int *)(this + 0x278) != 0) {
*(undefined4 *)(*(int *)(this + 0x278) + 4) = *(undefined4 *)(this + 0x27c);
}
}
*(undefined4 *)(this + 0x27c) = 0;
*(undefined4 *)(this + 0x278) = 0;
}
*(int **)(this + 0x280) = piVar5;
piVar4 = (int *)0x0;
if (piVar5 != (int *)0x0) {
*(int *)(this + 0x278) = *piVar5;
if (*piVar5 != 0) {
*(CParticleSystemDefinition **)(*piVar5 + 4) = pCVar1;
}
*(undefined4 *)(this + 0x27c) = 0;
*piVar5 = (int)pCVar1;
piVar4 = *(int **)(this + 0x280);
}
}
}
}
return piVar4;
}
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.