CRagdollLRURetirement::MoveToTopOfLRU
0x0051e5c0 · 260 bytes · __thiscall
_ZN21CRagdollLRURetirement14MoveToTopOfLRUEP14CBaseAnimating11RagdollType
Decompiled
undefined (3 params)
/* CRagdollLRURetirement::MoveToTopOfLRU(CBaseAnimating*, RagdollType) */
void __thiscall
CRagdollLRURetirement::MoveToTopOfLRU(CRagdollLRURetirement *this,int *param_1,int param_3)
{
uint *puVar1;
uint uVar2;
undefined4 *puVar3;
undefined *puVar4;
uint uVar5;
undefined4 local_20 [4];
uVar5 = (uint)*(ushort *)(this + param_3 * 0x1c + 0x18);
if (uVar5 != 0xffff) {
do {
puVar1 = (uint *)(*(int *)(this + param_3 * 0x1c + 0xc) + uVar5 * 8);
uVar2 = *puVar1;
if (((uVar2 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar2 >> 0xc)) {
if (param_1 != (int *)0x0) goto LAB_0051e605;
LAB_0051e650:
CUtlLinkedList<CHandle<CBaseAnimating>,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CHandle<CBaseAnimating>,unsigned_short>,unsigned_short>>
::Unlink((CUtlLinkedList<CHandle<CBaseAnimating>,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CHandle<CBaseAnimating>,unsigned_short>,unsigned_short>>
*)(this + param_3 * 0x1c + 0xc),(ushort)uVar5);
*(undefined2 *)(*(int *)(this + param_3 * 0x1c + 0xc) + 6 + uVar5 * 8) =
*(undefined2 *)(this + param_3 * 0x1c + 0x1c);
*(ushort *)(this + param_3 * 0x1c + 0x1c) = (ushort)uVar5;
goto LAB_0051e68a;
}
if (param_1 == *(int **)(puVar4 + 4)) goto LAB_0051e650;
LAB_0051e605:
uVar5 = (uint)*(ushort *)((int)puVar1 + 6);
} while (uVar5 != 0xffff);
}
*(int *)(this + 0xb4) = *(int *)(this + 0xb4) + 1;
LAB_0051e68a:
local_20[0] = 0xffffffff;
if (param_1 != (int *)0x0) {
puVar3 = (undefined4 *)(**(code **)(*param_1 + 0xc))(param_1);
local_20[0] = *puVar3;
}
CUtlLinkedList<CHandle<CBaseAnimating>,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CHandle<CBaseAnimating>,unsigned_short>,unsigned_short>>
::InsertBefore((CUtlLinkedList<CHandle<CBaseAnimating>,unsigned_short,false,unsigned_short,CUtlMemory<UtlLinkedListElem_t<CHandle<CBaseAnimating>,unsigned_short>,unsigned_short>>
*)(this + param_3 * 0x1c + 0xc),0xffff,(CHandle *)local_20);
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.