CBasePlayer::PackDeadPlayerItems
0x007a7590 · 420 bytes · __thiscall
_ZN11CBasePlayer19PackDeadPlayerItemsEv
Decompiled
undefined (1 param)
/* CBasePlayer::PackDeadPlayerItems() */
void __thiscall CBasePlayer::PackDeadPlayerItems(CBasePlayer *this)
{
uint uVar1;
int iVar2;
int iVar3;
int iVar4;
undefined *puVar5;
CBasePlayer *pCVar6;
int *piVar7;
int iVar8;
int local_104;
int local_f0 [20];
int local_a0 [36];
piVar7 = local_f0;
for (iVar4 = 0x14; iVar4 != 0; iVar4 = iVar4 + -1) {
*piVar7 = 0;
piVar7 = piVar7 + 1;
}
piVar7 = local_a0;
for (iVar4 = 0x21; iVar4 != 0; iVar4 = iVar4 + -1) {
*piVar7 = -1;
piVar7 = piVar7 + 1;
}
iVar4 = (**(code **)(*g_pGameRules + 0x198))(g_pGameRules,this);
iVar2 = (**(code **)(*g_pGameRules + 0x19c))(g_pGameRules,this);
if ((iVar2 != 0xc) || (iVar4 != 9)) {
pCVar6 = this + 0x18f4;
local_104 = 0;
do {
while ((((uVar1 = *(uint *)pCVar6, uVar1 == 0xffffffff ||
(puVar5 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc))
|| (*(uint *)(puVar5 + 8) != uVar1 >> 0xc)) ||
(iVar8 = *(int *)(puVar5 + 4), iVar8 == 0))) {
LAB_007a7620:
pCVar6 = pCVar6 + 4;
if (pCVar6 == this + 0x19d4) goto LAB_007a76b0;
}
if (iVar4 == 7) {
local_f0[local_104] = iVar8;
local_104 = local_104 + 1;
goto LAB_007a7620;
}
if (((iVar4 != 8) ||
(iVar3 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this), iVar3 == 0))
|| (iVar3 = CBaseCombatCharacter::GetActiveWeapon((CBaseCombatCharacter *)this),
iVar3 != iVar8)) goto LAB_007a7620;
pCVar6 = pCVar6 + 4;
local_f0[local_104] = iVar3;
local_104 = local_104 + 1;
} while (pCVar6 != this + 0x19d4);
LAB_007a76b0:
iVar4 = 0;
iVar8 = 0;
if (iVar2 != 0xc) {
do {
iVar3 = CBaseCombatCharacter::GetAmmoCount((CBaseCombatCharacter *)this,iVar8);
if ((0 < iVar3) && (iVar2 == 10)) {
local_a0[iVar4] = iVar8;
iVar4 = iVar4 + 1;
}
iVar8 = iVar8 + 1;
} while (iVar8 != 0x20);
}
}
(**(code **)(*(int *)this + 0x5c4))(this,1);
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.