CFuncPlat::Blocked
0x00b08e80 · 239 bytes · __thiscall
_ZN9CFuncPlat7BlockedEP11CBaseEntity
Decompiled
undefined (2 params)
/* CFuncPlat::Blocked(CBaseEntity*) */
void __thiscall CFuncPlat::Blocked(CFuncPlat *this,CBaseEntity *param_1)
{
undefined1 *puVar1;
int iVar2;
undefined1 *puVar3;
CTakeDamageInfo local_7c [108];
puVar3 = *(undefined1 **)(param_1 + 0x7c);
if (puVar3 == (undefined1 *)0x0) {
puVar3 = &DAT_00d539c2;
}
puVar1 = &DAT_00d539c2;
if (*(undefined1 **)(this + 0x7c) != (undefined1 *)0x0) {
puVar1 = *(undefined1 **)(this + 0x7c);
}
DevMsg(2,"%s Blocked by %s\n",puVar1,puVar3);
CTakeDamageInfo::CTakeDamageInfo(local_7c,(CBaseEntity *)this,(CBaseEntity *)this,1.0,1,0);
CBaseEntity::TakeDamage(param_1,local_7c);
if (*(char **)(this + 0x4d0) != (char *)0x0) {
if (*(int *)(this + 0x30) == 0) {
iVar2 = 0;
}
else {
iVar2 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
CBaseEntity::StopSound(iVar2,6,*(char **)(this + 0x4d0));
}
if (*(int *)(this + 0x440) == 2) {
(**(code **)(*(int *)this + 0x330))(this);
}
else if (*(int *)(this + 0x440) == 3) {
(**(code **)(*(int *)this + 0x32c))(this);
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.