CBaseCombatWeapon::DefaultTouch
0x00404c50 · 161 bytes · __thiscall
_ZN17CBaseCombatWeapon12DefaultTouchEP11CBaseEntity
Decompiled
undefined (2 params)
/* CBaseCombatWeapon::DefaultTouch(CBaseEntity*) */
void __thiscall CBaseCombatWeapon::DefaultTouch(CBaseCombatWeapon *this,CBaseEntity *param_1)
{
CBaseCombatWeapon CVar1;
char cVar2;
if (((((byte)this[0x153] & 0x10) == 0) && (param_1 != (CBaseEntity *)0x0)) &&
(cVar2 = (**(code **)(*(int *)param_1 + 0x16c))(param_1), cVar2 != '\0')) {
cVar2 = UTIL_ItemCanBeTouchedByPlayer((CBaseEntity *)this,(CBasePlayer *)param_1);
if (cVar2 == '\0') {
CVar1 = this[0x148];
}
else {
COutputEvent::FireOutput((COutputEvent *)(this + 0x14d8),param_1,(CBaseEntity *)this,0.0);
CVar1 = this[0x148];
}
if ((((byte)CVar1 & 2) == 0) &&
(cVar2 = (**(code **)(*(int *)param_1 + 0x6ac))(param_1,this), cVar2 != '\0')) {
/* WARNING: Could not recover jumptable at 0x00404cc7. Too many branches */
/* WARNING: Treating indirect jump as call */
(**(code **)(*(int *)this + 0x4e4))();
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.