CBaseEntity::GetAttackDamageScale
0x005ffbb0 · 160 bytes · __cdecl
_ZN11CBaseEntity20GetAttackDamageScaleEPS_
Decompiled
undefined (1 param)
/* CBaseEntity::GetAttackDamageScale(CBaseEntity*) */
longdouble CBaseEntity::GetAttackDamageScale(CBaseEntity *param_1)
{
char cVar1;
int iVar2;
int iVar3;
longdouble lVar4;
float local_20;
iVar2 = *(int *)(param_1 + 0x164);
if (iVar2 == -1) {
local_20 = 1.0;
}
else {
iVar3 = *(int *)(param_1 + 0x158);
local_20 = 1.0;
do {
while( true ) {
cVar1 = CDamageModifier::IsDamageDoneToMe(*(CDamageModifier **)(iVar3 + iVar2 * 0xc));
if (cVar1 != '\0') break;
lVar4 = (longdouble)
CDamageModifier::GetModifier
(*(CDamageModifier **)(*(int *)(param_1 + 0x158) + iVar2 * 0xc));
iVar3 = *(int *)(param_1 + 0x158);
iVar2 = *(int *)(iVar3 + 8 + iVar2 * 0xc);
local_20 = (float)lVar4 * local_20;
if (iVar2 == -1) goto LAB_005ffc3a;
}
iVar3 = *(int *)(param_1 + 0x158);
iVar2 = *(int *)(iVar3 + 8 + iVar2 * 0xc);
} while (iVar2 != -1);
}
LAB_005ffc3a:
return (longdouble)local_20;
}
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.