SurvivorBot::IsAnyWitchCloserThan
0x0093b440 · 220 bytes · __thiscall
_ZN11SurvivorBot20IsAnyWitchCloserThanEf
Decompiled
undefined (2 params)
/* SurvivorBot::IsAnyWitchCloserThan(float) */
undefined4 __thiscall SurvivorBot::IsAnyWitchCloserThan(SurvivorBot *this,float param_1)
{
CBaseEntity CVar1;
CBaseEntity *this_00;
undefined4 uVar2;
int iVar3;
iVar3 = 0;
if (0 < DAT_01025eac) {
do {
this_00 = *(CBaseEntity **)(TheWitches + iVar3 * 4);
if (((byte)this[0x14d] & 8) == 0) {
CVar1 = this_00[0x14d];
}
else {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
CVar1 = this_00[0x14d];
}
if (((byte)CVar1 & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(this_00);
}
if (((*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) *
(*(float *)(this_00 + 0x2e4) - *(float *)(this + 0x2e4)) +
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) *
(*(float *)(this_00 + 0x2e0) - *(float *)(this + 0x2e0)) +
(*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) *
(*(float *)(this_00 + 0x2e8) - *(float *)(this + 0x2e8)) < param_1 * param_1) &&
(uVar2 = (**(code **)(*(int *)this_00 + 300))(this_00), (char)uVar2 != '\0')) {
return uVar2;
}
iVar3 = iVar3 + 1;
} while (iVar3 < DAT_01025eac);
}
return 0;
}
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.