CMultiPlayerAnimState::RestartGesture
0x0046b170 · 519 bytes · __thiscall
_ZN21CMultiPlayerAnimState14RestartGestureEi8Activitybb
Decompiled
undefined (5 params)
/* CMultiPlayerAnimState::RestartGesture(int, Activity, bool, bool) */
int __thiscall
CMultiPlayerAnimState::RestartGesture
(CMultiPlayerAnimState *this,int param_1,int param_3,undefined1 param_4,undefined1 param_5
)
{
float fVar1;
int iVar2;
int *piVar3;
CBaseEdict *pCVar4;
int iVar5;
undefined4 uVar6;
int iVar7;
undefined4 uVar8;
int iVar9;
iVar9 = param_1 * 0x18;
iVar5 = *(int *)(this + 8) + iVar9;
if (((*(char *)(iVar5 + 10) == '\0') || (param_3 != *(int *)(iVar5 + 4))) &&
(piVar3 = *(int **)(this + 0x1c), piVar3 != (int *)0x0)) {
uVar6 = (**(code **)(*(int *)this + 0x18))(this,param_3);
iVar5 = (**(code **)(*(int *)this + 0x3c))(this,param_1,uVar6,piVar3);
if (0 < iVar5) {
AddToGestureSlot(this,param_1,uVar6,iVar5,param_4,param_5);
return iVar5;
}
uVar6 = ActivityList_NameForIndex(param_3);
uVar8 = (**(code **)(*piVar3 + 0xb8))(piVar3);
DevMsg(2,
"CMultiPlayerAnimState::AddToGestureSlot - unknown activity %d ( player %s, activity %s )\n"
,param_3,uVar8,uVar6);
}
else {
iVar2 = *(int *)(iVar5 + 0x14);
if (*(float *)(iVar2 + 0xc) == 0.0) {
fVar1 = *(float *)(iVar2 + 0x10);
}
else {
iVar5 = *(int *)(iVar2 + 0x48);
if (iVar5 != 0) {
if (*(char *)(iVar5 + 0x6c) == '\0') {
pCVar4 = *(CBaseEdict **)(iVar5 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
*(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar5 + 0x78) = 0;
*(undefined4 *)(iVar5 + 0x74) = uVar6;
}
*(undefined4 *)(iVar2 + 0xc) = 0;
iVar5 = *(int *)(this + 8) + iVar9;
iVar2 = *(int *)(iVar5 + 0x14);
fVar1 = *(float *)(iVar2 + 0x10);
}
if (fVar1 != 0.0) {
iVar5 = *(int *)(iVar2 + 0x48);
if (iVar5 != 0) {
if (*(char *)(iVar5 + 0x6c) == '\0') {
pCVar4 = *(CBaseEdict **)(iVar5 + 0x30);
if (pCVar4 != (CBaseEdict *)0x0) {
*(uint *)pCVar4 = *(uint *)pCVar4 | 0x101;
iVar7 = CBaseEdict::GetChangeAccessor(pCVar4);
*(undefined2 *)(iVar7 + 2) = 0;
}
}
else {
*(byte *)(iVar5 + 0x70) = *(byte *)(iVar5 + 0x70) | 1;
}
uVar6 = *(undefined4 *)(gpGlobals + 0xc);
*(undefined4 *)(iVar5 + 0x78) = 0;
*(undefined4 *)(iVar5 + 0x74) = uVar6;
}
*(undefined4 *)(iVar2 + 0x10) = 0;
iVar5 = *(int *)(this + 8) + iVar9;
}
*(undefined4 *)(iVar5 + 0xc) = 0;
*(undefined4 *)(*(int *)(this + 8) + 0x10 + iVar9) = 0;
iVar5 = *(int *)(*(int *)(*(int *)(this + 8) + 0x14 + iVar9) + 8);
}
return iVar5;
}
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.