CBasePlayer::ItemPreFrame
0x00415f80 · 180 bytes · __thiscall
_ZN11CBasePlayer12ItemPreFrameEv
Decompiled
undefined (1 param)
/* CBasePlayer::ItemPreFrame() */
void __thiscall CBasePlayer::ItemPreFrame(CBasePlayer *this)
{
uint uVar1;
int *piVar2;
int *piVar3;
undefined *puVar4;
int iVar5;
iVar5 = 0;
(**(code **)(*(int *)this + 0x6d8))(this,0);
piVar3 = (int *)CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this);
do {
while( true ) {
uVar1 = *(uint *)(this + iVar5 * 4 + 0x18f4);
if ((((uVar1 == 0xffffffff) ||
(puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
((piVar2 = *(int **)(puVar4 + 4), piVar2 == (int *)0x0 || (piVar3 == piVar2)))) break;
iVar5 = iVar5 + 1;
(**(code **)(*piVar2 + 0x44c))(piVar2);
if (iVar5 == 0x38) goto LAB_00416004;
}
iVar5 = iVar5 + 1;
} while (iVar5 != 0x38);
LAB_00416004:
if ((*(float *)(this + 0x17dc) < *(float *)(gpGlobals + 0xc) ||
*(float *)(this + 0x17dc) == *(float *)(gpGlobals + 0xc)) && (piVar3 != (int *)0x0)) {
/* WARNING: Could not recover jumptable at 0x0041602d. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*piVar3 + 0x440))();
return;
}
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.