CParticleCollection::SimulateFirstFrame
0x00bcc430 · 329 bytes · __thiscall
_ZN19CParticleCollection18SimulateFirstFrameEv
Decompiled
undefined (1 param)
/* CParticleCollection::SimulateFirstFrame() */
void __thiscall CParticleCollection::SimulateFirstFrame(CParticleCollection *this)
{
CParticleCollection *pCVar1;
char cVar2;
int iVar3;
int iVar4;
int iVar5;
CParticleCollection *this_00;
CParticleOperatorInstance *in_stack_ffffffb8;
float *in_stack_ffffffbc;
float *local_20;
*(undefined4 *)(this + 0x28) = 0x65a96816;
*(undefined4 *)(this + 0x34) = 0;
*(undefined4 *)(this + 0x330) = 0;
if (((byte)this[0x328] & 2) == 0) {
in_stack_ffffffb8 = (CParticleOperatorInstance *)0x3d4ccccd;
UpdatePrevControlPoints(this,0.05);
}
*(undefined4 *)(this + 0x34c) = 0;
iVar3 = *(int *)(this + 0x48);
iVar4 = *(int *)(iVar3 + 0x314);
if (0 < iVar4) {
iVar5 = 0;
do {
pCVar1 = *(CParticleCollection **)(*(int *)(iVar3 + 0x308) + iVar5 * 4);
this_00 = pCVar1;
cVar2 = (**(code **)(*(int *)pCVar1 + 0x70))();
if (cVar2 != '\0') {
if (pCVar1[0x3c] == (CParticleCollection)0x0) {
cVar2 = CheckIfOperatorShouldRun(this_00,in_stack_ffffffb8,in_stack_ffffffbc);
if (cVar2 == '\0') goto LAB_00bcc4d5;
}
else {
local_20 = (float *)0x3f800000;
}
in_stack_ffffffbc = local_20;
(**(code **)(*(int *)pCVar1 + 0x24))
(pCVar1,this,local_20,
*(int *)(this + 0x6c) +
*(int *)(*(int *)(*(int *)(this + 0x48) + 0x394) + iVar5 * 4));
in_stack_ffffffb8 = (CParticleOperatorInstance *)0x3d4ccccd;
UpdatePrevControlPoints(this,0.05);
}
LAB_00bcc4d5:
iVar5 = iVar5 + 1;
iVar3 = *(int *)(this + 0x48);
*(int *)(this + 0x34c) = *(int *)(this + 0x34c) + 0x11;
} while (iVar5 != iVar4);
}
iVar4 = *(int *)(iVar3 + 4);
if (*(int *)(this + 0x50) <= *(int *)(iVar3 + 4)) {
iVar4 = *(int *)(this + 0x50);
}
if (0 < iVar4) {
*(int *)(this + 0x30) = iVar4;
*(int *)(this + 0x20) = iVar4 + 3 >> 2;
InitializeNewParticles(this,0,iVar4,0);
}
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.