CBaseAnimating::GetSequenceKeyValues
0x005e2d50 · 261 bytes · __thiscall
_ZN14CBaseAnimating20GetSequenceKeyValuesEi
Decompiled
undefined (2 params)
/* CBaseAnimating::GetSequenceKeyValues(int) */
KeyValues * __thiscall CBaseAnimating::GetSequenceKeyValues(CBaseAnimating *this,int param_1)
{
code *pcVar1;
char cVar2;
char *pcVar3;
KeyValues *this_00;
undefined4 uVar4;
char *pcVar5;
int iVar6;
CStudioHdr *pCVar7;
CStudioHdr *pCVar8;
pCVar7 = *(CStudioHdr **)(this + 0x13e0);
if (pCVar7 == (CStudioHdr *)0x0) {
iVar6 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar6 == 0) {
pCVar7 = *(CStudioHdr **)(this + 0x13e0);
}
else {
LockStudioHdr(this);
pCVar7 = *(CStudioHdr **)(this + 0x13e0);
}
pCVar8 = (CStudioHdr *)0x0;
if (pCVar7 == (CStudioHdr *)0x0) goto LAB_005e2d73;
}
pCVar8 = (CStudioHdr *)0x0;
if (*(int *)pCVar7 != 0) {
pCVar8 = pCVar7;
}
LAB_005e2d73:
pcVar3 = (char *)Studio_GetKeyValueText(pCVar8,param_1);
if (pcVar3 == (char *)0x0) {
this_00 = (KeyValues *)0x0;
}
else {
this_00 = KeyValues::operator_new((KeyValues *)0x2c,param_1);
/* try { // try from 005e2db5 to 005e2db9 has its CatchHandler @ 005e2e64 */
KeyValues::KeyValues(this_00,"",(IKeyValuesSystem *)0x0,false);
pcVar1 = *(code **)(*modelinfo + 0x10);
uVar4 = CBaseEntity::GetModel((CBaseEntity *)this);
pcVar5 = (char *)(*pcVar1)(modelinfo,uVar4);
cVar2 = KeyValues::LoadFromBuffer(this_00,pcVar5,pcVar3,(IBaseFileSystem *)0x0,(char *)0x0);
if (cVar2 == '\0') {
this_00 = (KeyValues *)0x0;
KeyValues::deleteThis();
}
}
return this_00;
}
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.