CParticleCollection::Render
0x00bcb8e0 · 803 bytes · __thiscall
_ZN19CParticleCollection6RenderEP17IMatRenderContextRK8Vector4DbPv
Decompiled
undefined (5 params)
/* CParticleCollection::Render(IMatRenderContext*, Vector4D const&, bool, void*) */
void __thiscall
CParticleCollection::Render
(CParticleCollection *this,IMatRenderContext *param_1,Vector4D *param_2,bool param_3,
void *param_4)
{
int iVar1;
int iVar2;
int *piVar3;
char cVar4;
int iVar5;
int iVar6;
float fVar7;
IMatRenderContext *in_stack_ffffff74;
CParticleCollection *pCVar8;
IMatRenderContext *in_stack_ffffff78;
CParticleCollection *in_stack_ffffff7c;
float local_2c;
float local_28;
float local_24;
float local_20;
iVar5 = *(int *)(this + 0x48);
if (iVar5 == 0) {
return;
}
fVar7 = *(float *)(g_pParticleSystemMgr + 0x10c) + *(float *)(iVar5 + 0x2dc);
if (fVar7 <= *(float *)(this + 0x3c)) {
fVar7 = *(float *)(this + 0x3c);
}
*(float *)(this + 0x3c) = fVar7;
if (*(int *)(this + 0x30) != 0) {
local_2c = *(float *)(iVar5 + 0x148) * *(float *)param_2;
local_28 = *(float *)(iVar5 + 0x14c) * *(float *)(param_2 + 4);
local_24 = *(float *)(iVar5 + 0x150) * *(float *)(param_2 + 8);
local_20 = *(float *)(iVar5 + 0x154) * *(float *)(param_2 + 0xc);
if (((*(byte *)(iVar5 + 0x41e) & 1) != 0) &&
(pCVar8 = *(CParticleCollection **)(iVar5 + 0x144), pCVar8 != (CParticleCollection *)0x0)) {
if (param_3) {
cVar4 = (**(code **)(*(int *)pCVar8 + 0x44))();
if ((cVar4 == '\0') && (local_20 == 1.0)) goto LAB_00bcbb60;
iVar5 = *(int *)(this + 0x48);
in_stack_ffffff74 = (IMatRenderContext *)pCVar8;
}
iVar2 = *(int *)(iVar5 + 0x328);
if (0 < iVar2) {
iVar6 = 0;
do {
iVar1 = iVar6 * 4;
if (*(char *)(*(int *)(*(int *)(iVar5 + 0x31c) + iVar6 * 4) + 0x3c) == '\0') {
cVar4 = CheckIfOperatorShouldRun
((CParticleCollection *)in_stack_ffffff74,
(CParticleOperatorInstance *)in_stack_ffffff78,
(float *)in_stack_ffffff7c);
if (cVar4 != '\0') {
iVar5 = *(int *)(this + 0x48);
goto LAB_00bcb9c7;
}
}
else {
LAB_00bcb9c7:
in_stack_ffffff7c = this;
if (*(char *)(iVar5 + 0x2bf) == '\0') {
in_stack_ffffff74 = *(IMatRenderContext **)(*(int *)(iVar5 + 0x31c) + iVar1);
in_stack_ffffff78 = param_1;
(**(code **)(*(int *)in_stack_ffffff74 + 0x28))();
}
else {
(**(code **)(*(int *)param_1 + 0x50))(param_1,0);
(**(code **)(*(int *)param_1 + 0x54))(param_1);
(**(code **)(*(int *)param_1 + 0x7c))(param_1);
(**(code **)(*(int *)param_1 + 0x50))(param_1,1);
(**(code **)(*(int *)param_1 + 0x54))(param_1);
(**(code **)(*(int *)param_1 + 0x7c))(param_1);
(**(code **)(*(int *)param_1 + 0x80))
(param_1,0,0xc0590000,0,0xc0590000,0,0x40590000,0,0x40590000,0,0xc0590000,0,
0x40590000);
piVar3 = *(int **)(*(int *)(*(int *)(this + 0x48) + 0x31c) + iVar1);
(**(code **)(*piVar3 + 0x28))
(piVar3,param_1,this,&local_2c,
*(int *)(this + 0x6c) +
*(int *)(*(int *)(*(int *)(this + 0x48) + 0x3a8) + iVar1));
(**(code **)(*(int *)param_1 + 0x50))(param_1,0);
(**(code **)(*(int *)param_1 + 0x58))(param_1);
in_stack_ffffff78 = (IMatRenderContext *)0x1;
(**(code **)(*(int *)param_1 + 0x50))(param_1);
in_stack_ffffff74 = param_1;
(**(code **)(*(int *)param_1 + 0x58))();
}
}
iVar6 = iVar6 + 1;
if (iVar6 == iVar2) break;
iVar5 = *(int *)(this + 0x48);
} while( true );
}
}
}
LAB_00bcbb60:
for (pCVar8 = *(CParticleCollection **)(this + 0x90); pCVar8 != (CParticleCollection *)0x0;
pCVar8 = *(CParticleCollection **)(pCVar8 + 0x70)) {
Render(pCVar8,param_1,param_2,param_3,param_4);
}
piVar3 = *(int **)(this + 0x380);
if (piVar3 != (int *)0x0) {
(**(code **)(*piVar3 + 0x78))(piVar3,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.