CGasCan::DropCarriedProp
0x00537ef0 · 537 bytes · __thiscall
_ZN7CGasCan15DropCarriedPropEb
Decompiled
undefined (2 params)
/* CGasCan::DropCarriedProp(bool) */
undefined4 __thiscall CGasCan::DropCarriedProp(CGasCan *this,bool param_1)
{
uint uVar1;
CTerrorPlayer *this_00;
code *pcVar2;
char cVar3;
undefined4 uVar4;
int *piVar5;
int *piVar6;
undefined *puVar7;
if (this[0x1800] == (CGasCan)0x0) {
uVar1 = *(uint *)(this + 0x220);
if ((((uVar1 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) &&
(((this_00 = *(CTerrorPlayer **)(puVar7 + 4), this_00 != (CTerrorPlayer *)0x0 &&
(cVar3 = (**(code **)(*(int *)this_00 + 0x16c))(this_00), cVar3 != '\0')) &&
((cVar3 = CTerrorPlayer::IsDominatedBySpecialInfected(this_00), cVar3 != '\0' ||
(((uVar1 = *(uint *)(this + 0x1584), uVar1 != 0xffffffff &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
((*(uint *)(puVar7 + 8) == uVar1 >> 0xc && (*(int *)(puVar7 + 4) != 0)))))))))) {
piVar5 = (int *)CTerrorPlayer::GetSpecialInfectedDominatingMe(this_00);
if ((piVar5 == (int *)0x0) &&
((((uVar1 = *(uint *)(this + 0x1584), uVar1 == 0xffffffff ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) ||
((piVar5 = *(int **)(puVar7 + 4), piVar5 == (int *)0x0 ||
(cVar3 = (**(code **)(*piVar5 + 0x16c))(piVar5), cVar3 == '\0')))))) {
(**(code **)(*gameeventmanager + 0x1c))(gameeventmanager,"gas_can_forced_drop",0,0);
}
else {
piVar6 = (int *)(**(code **)(*gameeventmanager + 0x1c))
(gameeventmanager,"gas_can_forced_drop",0,0);
if (piVar6 != (int *)0x0) {
pcVar2 = *(code **)(*piVar6 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,piVar5[0xc]);
(*pcVar2)(piVar6,"userid",uVar4);
pcVar2 = *(code **)(*piVar6 + 0x30);
uVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this_00 + 0x30));
(*pcVar2)(piVar6,"victim",uVar4);
(**(code **)(*gameeventmanager + 0x20))(gameeventmanager,piVar6,0);
}
}
}
uVar4 = CCarriedPropWeapon::DropCarriedProp((CCarriedPropWeapon *)this,param_1);
return uVar4;
}
this[0x1800] = (CGasCan)0x0;
return 0;
}
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.