CItem::ItemTouch
0x006e4980 · 232 bytes · __thiscall
_ZN5CItem9ItemTouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CItem::ItemTouch(CBaseEntity*) */
void __thiscall CItem::ItemTouch(CItem *this,CBaseEntity *param_1)
{
char cVar1;
int iVar2;
undefined4 *puVar3;
iVar2 = (**(code **)(*(int *)param_1 + 0x18c))(param_1);
if (iVar2 != 0) {
puVar3 = (undefined4 *)(**(code **)(*(int *)param_1 + 0x18c))(param_1);
param_1 = (CBaseEntity *)(**(code **)*puVar3)(puVar3,0);
if (param_1 == (CBaseEntity *)0x0) {
return;
}
}
cVar1 = (**(code **)(*(int *)param_1 + 0x16c))(param_1);
if ((((cVar1 != '\0') &&
(cVar1 = UTIL_ItemCanBeTouchedByPlayer((CBaseEntity *)this,(CBasePlayer *)param_1),
cVar1 != '\0')) &&
(COutputEvent::FireOutput((COutputEvent *)(this + 0x1414),param_1,(CBaseEntity *)this,0.0),
*(CBasePlayer *)(param_1 + 0x17d9) == (CBasePlayer)0x0)) &&
(cVar1 = (**(code **)(*g_pGameRules + 0x160))(g_pGameRules,param_1,this), cVar1 != '\0')) {
cVar1 = (**(code **)(*(int *)this + 0x3ac))(this,param_1);
if (cVar1 == '\0') {
if (gEvilImpulse101 != 0) {
UTIL_Remove((CBaseEntity *)this);
return;
}
}
else {
(**(code **)(*(int *)this + 0x3b0))(this,param_1,param_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.