CParticleCollection::InitializeNewParticles
0x00bcbfd0 · 1066 bytes · __thiscall
_ZN19CParticleCollection22InitializeNewParticlesEiij
Decompiled
undefined (4 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CParticleCollection::InitializeNewParticles(int, int, unsigned int) */
void __thiscall
CParticleCollection::InitializeNewParticles
(CParticleCollection *this,int param_1,int param_2,uint param_3)
{
uint *puVar1;
void *pvVar2;
CParticleOperatorInstance *pCVar3;
int *piVar4;
char cVar5;
uint uVar6;
int iVar7;
int iVar8;
int local_4c;
uint local_40;
undefined4 local_34;
undefined4 local_30;
undefined4 local_28;
undefined4 local_24;
int local_20;
local_34 = 0;
local_30 = 0;
if (_towlower == 0) {
local_20 = 0;
}
else {
(**(code **)(_towlower + 0x50))
(_towlower,&local_34,0,0,0,0,"/data/src/particles_server/../particles/particles.cpp",
0x7d5,&InitializeNewParticles(int,int,unsigned_int)::tm_fmt,"(%s)%s",
"Particle Simulation","CParticleCollection::InitializeNewParticles");
local_20 = _towlower;
}
iVar8 = _DAT_0105db00;
local_28 = local_34;
local_24 = local_30;
/* try { // try from 00bcc279 to 00bcc2d9 has its CatchHandler @ 00bcc401 */
if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
(iVar7 = ThreadGetCurrentId(), iVar8 == iVar7)) {
if ((char *)*_DAT_0105d15c != "CParticleCollection::InitializeNewParticles") {
_DAT_0105d15c =
(int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xd5648c,(char *)0x0,0xd55928);
}
puVar1 = (uint *)(_DAT_0105d1e8 + 4 + _DAT_0105d15c[0x1c] * 8);
*puVar1 = *puVar1 | 4;
CVProfNode::EnterScope();
DAT_0105d158 = '\0';
}
local_40 = ~param_3 & (*(uint *)(this + 0xcc) | *(uint *)(this + 200));
iVar8 = *(int *)(this + 0x48);
iVar7 = *(int *)(iVar8 + 0x33c);
if (0 < iVar7) {
local_4c = 0;
while( true ) {
pCVar3 = *(CParticleOperatorInstance **)(*(int *)(iVar8 + 0x330) + local_4c * 4);
/* try { // try from 00bcc0f3 to 00bcc265 has its CatchHandler @ 00bcc416 */
uVar6 = (**(code **)(*(int *)pCVar3 + 0xc))(pCVar3);
if (((uVar6 & local_40) != 0) &&
(cVar5 = (**(code **)(*(int *)pCVar3 + 0x5c))(pCVar3), cVar5 == '\0')) {
pvVar2 = (void *)(*(int *)(this + 0x6c) +
*(int *)(*(int *)(*(int *)(this + 0x48) + 0x3bc) + local_4c * 4));
/* try { // try from 00bcc2eb to 00bcc32d has its CatchHandler @ 00bcc416 */
if ((((byte)this[0x32c] & 1) == 0) ||
(cVar5 = (**(code **)(*(int *)pCVar3 + 0x60))(pCVar3), cVar5 != '\0')) {
CParticleOperatorInstance::InitNewParticles(pCVar3,this,param_1,param_2,local_40,pvVar2);
}
else {
iVar8 = param_1;
if (0 < param_2) {
do {
CParticleOperatorInstance::InitNewParticles(pCVar3,this,iVar8,1,local_40,pvVar2);
iVar8 = iVar8 + 1;
} while (iVar8 != param_2 + param_1);
}
}
local_40 = local_40 & ~uVar6;
}
if (local_4c + 1 == iVar7) break;
local_4c = local_4c + 1;
iVar8 = *(int *)(this + 0x48);
}
local_4c = 0;
do {
piVar4 = *(int **)(*(int *)(*(int *)(this + 0x48) + 0x330) + local_4c * 4);
uVar6 = (**(code **)(*piVar4 + 0xc))(piVar4);
pCVar3 = *(CParticleOperatorInstance **)
(*(int *)(*(int *)(this + 0x48) + 0x330) + local_4c * 4);
cVar5 = (**(code **)(*(int *)pCVar3 + 0x5c))(pCVar3);
if (cVar5 != '\0') {
pvVar2 = (void *)(*(int *)(this + 0x6c) +
*(int *)(*(int *)(*(int *)(this + 0x48) + 0x3bc) + local_4c * 4));
if ((((byte)this[0x32c] & 1) == 0) ||
(cVar5 = (**(code **)(*(int *)pCVar3 + 0x60))(pCVar3), cVar5 != '\0')) {
CParticleOperatorInstance::InitNewParticles(pCVar3,this,param_1,param_2,local_40,pvVar2);
}
else {
iVar8 = param_1;
if (0 < param_2) {
do {
CParticleOperatorInstance::InitNewParticles(pCVar3,this,iVar8,1,local_40,pvVar2);
iVar8 = iVar8 + 1;
} while (iVar8 != param_1 + param_2);
}
}
local_40 = local_40 & ~uVar6;
}
local_4c = local_4c + 1;
} while (local_4c != iVar7);
}
InitParticleAttributes(this,param_1,param_2,local_40);
CopyInitialAttributeValues(this,param_1,param_2);
iVar8 = _DAT_0105db00;
if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
(iVar7 = ThreadGetCurrentId(), iVar8 == iVar7)) {
cVar5 = CVProfNode::ExitScope();
if (cVar5 != '\0') {
_DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
}
DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
}
if (local_20 != 0) {
(**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,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.