SurvivorBot::IsAheadOf
0x009387a0 · 159 bytes · __thiscall
_ZNK11SurvivorBot9IsAheadOfEP13CTerrorPlayer
Decompiled
undefined (2 params)
/* SurvivorBot::IsAheadOf(CTerrorPlayer*) const */
bool __thiscall SurvivorBot::IsAheadOf(SurvivorBot *this,CTerrorPlayer *param_1)
{
float fVar1;
bool bVar2;
bool bVar3;
int iVar4;
int iVar5;
iVar4 = (**(code **)(*(int *)this + 0x52c))(this);
iVar5 = (**(code **)(*(int *)param_1 + 0x52c))(param_1);
if (iVar4 == 0 || iVar5 == 0) {
return false;
}
if (iVar4 != iVar5) {
fVar1 = *(float *)(iVar4 + 0x154);
bVar2 = fVar1 != *(float *)(iVar5 + 0x154);
if (*(float *)(iVar5 + 0x154) <= fVar1 && bVar2) {
bVar3 = true;
}
else {
bVar3 = false;
if (!bVar2) goto LAB_009387ee;
}
return bVar3;
}
LAB_009387ee:
if (*(int *)(this + 0x30) == 0) {
iVar4 = 0;
}
else {
iVar4 = *(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
if (*(int *)(param_1 + 0x30) == 0) {
iVar5 = 0;
}
else {
iVar5 = *(int *)(param_1 + 0x30) - *(int *)(gpGlobals + 0x58) >> 4;
}
return iVar5 < iVar4;
}
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.