CEnvParticleScript::PrecacheAnimationEventMaterials
0x00692b90 · 362 bytes · __thiscall
_ZN18CEnvParticleScript31PrecacheAnimationEventMaterialsEv
Decompiled
undefined (1 param)
/* CEnvParticleScript::PrecacheAnimationEventMaterials() */
void __thiscall CEnvParticleScript::PrecacheAnimationEventMaterials(CEnvParticleScript *this)
{
int iVar1;
int iVar2;
int iVar3;
int iVar4;
int iVar5;
int iVar6;
int iVar7;
int in_GS_OFFSET;
CStudioHdr *local_238;
undefined1 local_220 [256];
char local_120 [256];
int local_20;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
local_238 = *(CStudioHdr **)(this + 0x13e0);
if (local_238 == (CStudioHdr *)0x0) {
iVar2 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar2 == 0) {
local_238 = *(CStudioHdr **)(this + 0x13e0);
}
else {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
local_238 = *(CStudioHdr **)(this + 0x13e0);
}
if (local_238 == (CStudioHdr *)0x0) goto LAB_00692ca5;
}
if ((*(int *)local_238 != 0) && (iVar2 = CStudioHdr::GetNumSeq(local_238), 0 < iVar2)) {
iVar7 = 0;
do {
iVar6 = 0;
iVar5 = 0;
iVar3 = CStudioHdr::pSeqdesc(local_238,iVar7);
iVar1 = *(int *)(iVar3 + 0x18);
if (0 < iVar1) {
do {
while ((iVar4 = *(int *)(iVar3 + 0x1c) + iVar6 + iVar3, *(int *)(iVar4 + 4) != 0x1772 ||
(iVar4 = sscanf((char *)(iVar4 + 0xc),"%255s %255s",local_220,local_120),
iVar4 != 2))) {
iVar5 = iVar5 + 1;
iVar6 = iVar6 + 0x50;
if (iVar5 == iVar1) goto LAB_00692c96;
}
iVar5 = iVar5 + 1;
iVar6 = iVar6 + 0x50;
PrecacheMaterial(local_120);
} while (iVar5 != iVar1);
}
LAB_00692c96:
iVar7 = iVar7 + 1;
} while (iVar7 != iVar2);
}
LAB_00692ca5:
if (local_20 != *(int *)(in_GS_OFFSET + 0x14)) {
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.