CParticleSystemMgr::CreateParticleCollection
0x00bd0df0 · 201 bytes · __cdecl
_ZN18CParticleSystemMgr24CreateParticleCollectionERK10UniqueId_tfi
Decompiled
undefined (3 params)
/* CParticleSystemMgr::CreateParticleCollection(UniqueId_t const&, float, int) */
CParticleCollection *
CParticleSystemMgr::CreateParticleCollection(UniqueId_t *param_1,float param_2,int param_3)
{
char cVar1;
CParticleSystemDefinition *pCVar2;
CParticleCollection *this;
int in_GS_OFFSET;
int in_stack_00000010;
char local_120 [256];
int local_20;
this = (CParticleCollection *)0x0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
cVar1 = IsUniqueIdValid((UniqueId_t *)param_2);
if (cVar1 != '\0') {
pCVar2 = (CParticleSystemDefinition *)
CParticleSystemDictionary::FindParticleSystem
(*(CParticleSystemDictionary **)(param_1 + 0x8c),(UniqueId_t *)param_2);
if (pCVar2 == (CParticleSystemDefinition *)0x0) {
UniqueIdToString((UniqueId_t *)param_2,local_120,0x100);
Warning("Attempted to create unknown particle system id %s\n",local_120);
}
else {
this = (CParticleCollection *)memalign(0x10,0x390);
CParticleCollection::CParticleCollection(this);
CParticleCollection::Init(this,pCVar2,(float)param_3,in_stack_00000010);
}
}
if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
return this;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.