CRagdollProp::SetupBones
0x0079ae80 · 511 bytes · __thiscall
_ZN12CRagdollProp10SetupBonesEP11matrix3x4_ti
Decompiled
undefined (3 params)
/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CRagdollProp::SetupBones(matrix3x4_t*, int) */
void __thiscall CRagdollProp::SetupBones(CRagdollProp *this,matrix3x4_t *param_1,int param_2)
{
int *piVar1;
char cVar2;
int iVar3;
int iVar4;
CRagdollProp *pCVar5;
RadianEuler *pRVar6;
matrix3x4_t *pmVar7;
int *local_e0;
undefined4 local_dc;
matrix3x4_t *local_d8;
matrix3x4_t local_cc [48];
char local_9c [140];
if (*(int *)(this + 0x13f8) == 0) {
CBaseAnimating::SetupBones((CBaseAnimating *)this,param_1,param_2);
return;
}
CBaseAnimating::UpdateModelScale((CBaseAnimating *)this);
piVar1 = mdlcache;
(**(code **)(*mdlcache + 0x68))(mdlcache);
local_e0 = *(int **)(this + 0x13e0);
if (local_e0 == (int *)0x0) {
/* try { // try from 0079b05c to 0079b06c has its CatchHandler @ 0079b090 */
iVar3 = CBaseEntity::GetModel((CBaseEntity *)this);
if (iVar3 != 0) {
CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
}
local_e0 = *(int **)(this + 0x13e0);
if (local_e0 != (int *)0x0) goto LAB_0079aec8;
}
else {
LAB_0079aec8:
iVar3 = *local_e0;
if (iVar3 != 0) goto LAB_0079aed8;
}
local_e0 = (int *)0x0;
iVar3 = _DAT_00000000;
LAB_0079aed8:
iVar4 = 0;
pCVar5 = this + 0x1410;
memset(local_9c,0,*(size_t *)(iVar3 + 0x9c));
local_dc = 0;
local_d8 = param_1;
if (0 < *(int *)(this + 0x13f8)) {
do {
/* try { // try from 0079af4d to 0079b009 has its CatchHandler @ 0079b090 */
if ((*(int *)pCVar5 != 0) &&
(cVar2 = RagdollGetBoneMatrix
((ragdoll_t *)(this + 0x13f8),(CBoneAccessor *)&local_dc,iVar4),
cVar2 != '\0')) {
local_9c[*(int *)(this + iVar4 * 4 + 0x1be4)] = '\x01';
}
iVar4 = iVar4 + 1;
pCVar5 = pCVar5 + 0x54;
} while (iVar4 < *(int *)(this + 0x13f8));
}
iVar4 = 0;
iVar3 = *local_e0;
pRVar6 = (RadianEuler *)(*(int *)(iVar3 + 0xa0) + iVar3 + 0x3c);
pmVar7 = param_1;
if (0 < *(int *)(iVar3 + 0x9c)) {
do {
if ((local_9c[iVar4] == '\0') && ((param_2 & *(uint *)(local_e0[0xb] + iVar4 * 4)) != 0)) {
AngleMatrix(pRVar6,(Vector *)(pRVar6 + -0x1c),local_cc);
ConcatTransforms(param_1 + *(int *)(pRVar6 + -0x38) * 0x30,local_cc,pmVar7);
iVar3 = *local_e0;
}
iVar4 = iVar4 + 1;
pmVar7 = pmVar7 + 0x30;
pRVar6 = pRVar6 + 0xd8;
} while (iVar4 < *(int *)(iVar3 + 0x9c));
}
(**(code **)(*piVar1 + 0x6c))(piVar1);
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.