CBaseAnimating::FindBodyGroupVariant
0x005e49e0 · 303 bytes · __thiscall
_ZN14CBaseAnimating20FindBodyGroupVariantEii
Decompiled
undefined (3 params)
/* CBaseAnimating::FindBodyGroupVariant(int, int) */
int __thiscall CBaseAnimating::FindBodyGroupVariant(CBaseAnimating *this,int param_1,int param_2)
{
char cVar1;
int iVar2;
char *pcVar3;
long lVar4;
int iVar5;
CStudioHdr *pCVar6;
CStudioHdr *pCVar7;
int iVar8;
int iVar9;
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar6 == (CStudioHdr *)0x0) {
iVar8 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar8 == 0) {
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar7 = (CStudioHdr *)0x0;
if (pCVar6 == (CStudioHdr *)0x0) goto LAB_005e4a03;
}
pCVar7 = (CStudioHdr *)0x0;
if (*(int *)pCVar6 != 0) {
pCVar7 = pCVar6;
}
LAB_005e4a03:
iVar9 = 0;
iVar8 = 0;
iVar2 = ::GetBodygroupCount(pCVar7,param_1);
if (0 < iVar2) {
do {
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar6 == (CStudioHdr *)0x0) {
iVar5 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar5 == 0) {
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
pCVar6 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar7 = (CStudioHdr *)0x0;
if (pCVar6 != (CStudioHdr *)0x0) goto LAB_005e4a43;
}
else {
LAB_005e4a43:
pCVar7 = (CStudioHdr *)0x0;
if (*(int *)pCVar6 != 0) {
pCVar7 = pCVar6;
}
}
pcVar3 = (char *)::GetBodygroupPartName(pCVar7,param_1,iVar9);
cVar1 = *pcVar3;
if ((cVar1 != '\0') && (lVar4 = strtol(pcVar3 + 1,(char **)0x0,10), lVar4 != -1)) {
iVar8 = (iVar8 + 1) - (uint)(cVar1 == 'D');
}
if (param_2 == iVar8) {
return iVar9;
}
iVar9 = iVar9 + 1;
} while (iVar9 != iVar2);
}
return -1;
}
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.