CGreedAwardTemplate::GetHealthLevelForPlayer
0x00851e70 · 112 bytes · __thiscall
_ZN19CGreedAwardTemplate23GetHealthLevelForPlayerEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* CGreedAwardTemplate::GetHealthLevelForPlayer(CTerrorPlayer*) */
undefined1 __thiscall
CGreedAwardTemplate::GetHealthLevelForPlayer(CGreedAwardTemplate *this,CTerrorPlayer *param_1)
{
int iVar1;
char cVar2;
undefined1 uVar3;
longdouble lVar4;
float fVar5;
iVar1 = *(int *)(param_1 + 0x100);
lVar4 = (longdouble)(**(code **)(*(int *)param_1 + 0x7e4))(param_1);
cVar2 = (**(code **)(*(int *)param_1 + 0x7e8))(param_1);
uVar3 = 1;
if (cVar2 == '\0') {
uVar3 = 2;
fVar5 = (float)(int)((float)lVar4 + (float)iVar1);
if (fVar5 < *(float *)(SurvivorLimpHealth._28_4_ + 0x2c) ||
fVar5 == *(float *)(SurvivorLimpHealth._28_4_ + 0x2c)) {
return 1 < (int)((float)lVar4 + (float)iVar1);
}
}
return uVar3;
}
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.