CParticleSystemMgr::AddToRenderCache
0x00bd0ec0 · 338 bytes · __thiscall
_ZN18CParticleSystemMgr16AddToRenderCacheEP19CParticleCollection
Decompiled
undefined (2 params)
/* CParticleSystemMgr::AddToRenderCache(CParticleCollection*) */
void __thiscall
CParticleSystemMgr::AddToRenderCache(CParticleSystemMgr *this,CParticleCollection *param_1)
{
int iVar1;
CParticleCollection *pCVar2;
char cVar3;
int iVar4;
int *piVar5;
int iVar6;
int iVar7;
undefined4 uVar8;
float fVar9;
iVar4 = *(int *)(param_1 + 0x48);
if (iVar4 == 0) {
return;
}
if ((*(byte *)(iVar4 + 0x41e) & 1) == 0) {
return;
}
piVar5 = *(int **)(iVar4 + 0x144);
if (piVar5 == (int *)0x0) {
return;
}
cVar3 = (**(code **)(*piVar5 + 0x44))(piVar5);
if (cVar3 != '\0') {
return;
}
iVar4 = *(int *)(param_1 + 0x48);
fVar9 = *(float *)(g_pParticleSystemMgr + 0x10c) + *(float *)(iVar4 + 0x2dc);
if (fVar9 <= *(float *)(param_1 + 0x3c)) {
fVar9 = *(float *)(param_1 + 0x3c);
}
*(float *)(param_1 + 0x3c) = fVar9;
iVar1 = *(int *)(this + 0x100);
if (iVar1 < 1) {
if (iVar1 != 0) {
piVar5 = *(int **)(this + 0xf4);
goto LAB_00bd0f75;
}
iVar7 = 0;
}
else {
iVar7 = 0;
piVar5 = *(int **)(this + 0xf4);
do {
iVar6 = 0;
if ((*(byte *)(iVar4 + 0x41e) & 1) != 0) {
iVar6 = *(int *)(iVar4 + 0x144);
}
if (*piVar5 == iVar6) goto LAB_00bd0f75;
iVar7 = iVar7 + 1;
piVar5 = piVar5 + 6;
} while (iVar7 != iVar1);
}
iVar4 = CUtlVector<CParticleSystemMgr::RenderCache_t,CUtlMemory<CParticleSystemMgr::RenderCache_t,int>>
::InsertBefore((CUtlVector<CParticleSystemMgr::RenderCache_t,CUtlMemory<CParticleSystemMgr::RenderCache_t,int>>
*)(this + 0xf4),iVar7);
uVar8 = 0;
if ((*(byte *)(*(int *)(param_1 + 0x48) + 0x41e) & 1) != 0) {
uVar8 = *(undefined4 *)(*(int *)(param_1 + 0x48) + 0x144);
}
*(undefined4 *)(*(int *)(this + 0xf4) + iVar4 * 0x18) = uVar8;
piVar5 = (int *)(iVar4 * 0x18 + *(int *)(this + 0xf4));
LAB_00bd0f75:
CUtlVector<CParticleCollection*,CUtlMemory<CParticleCollection*,int>>::InsertBefore
((CUtlVector<CParticleCollection*,CUtlMemory<CParticleCollection*,int>> *)(piVar5 + 1),
piVar5[4],¶m_1);
for (pCVar2 = *(CParticleCollection **)(param_1 + 0x90); pCVar2 != (CParticleCollection *)0x0;
pCVar2 = *(CParticleCollection **)(pCVar2 + 0x70)) {
AddToRenderCache(this,pCVar2);
}
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.