NextBotAttackTheIT::operator()
0x00758ee0 · 295 bytes · __thiscall
_ZN18NextBotAttackTheITclEP8INextBot
Decompiled
undefined (2 params)
/* NextBotAttackTheIT::TEMPNAMEPLACEHOLDERVALUE(INextBot*) */
undefined4 __thiscall NextBotAttackTheIT::operator()(NextBotAttackTheIT *this,INextBot *param_1)
{
float fVar1;
char cVar2;
CBaseEntity *pCVar3;
int iVar4;
int *piVar5;
float *pfVar6;
pCVar3 = (CBaseEntity *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
iVar4 = CBaseEntity::GetTeamNumber(pCVar3);
if (iVar4 == 3) {
piVar5 = (int *)(**(code **)(*(int *)param_1 + 0xb4))(param_1);
cVar2 = (**(code **)(*piVar5 + 300))(piVar5);
if (cVar2 != '\0') {
pCVar3 = *(CBaseEntity **)this;
fVar1 = *(float *)(this + 8);
if (((byte)pCVar3[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition(pCVar3);
}
pfVar6 = (float *)(**(code **)(*(int *)param_1 + 0xd4))(param_1);
if ((*pfVar6 - *(float *)(pCVar3 + 0x2e0)) * (*pfVar6 - *(float *)(pCVar3 + 0x2e0)) +
(pfVar6[1] - *(float *)(pCVar3 + 0x2e4)) * (pfVar6[1] - *(float *)(pCVar3 + 0x2e4)) +
(pfVar6[2] - *(float *)(pCVar3 + 0x2e8)) * (pfVar6[2] - *(float *)(pCVar3 + 0x2e8)) <
fVar1 * fVar1) {
iVar4 = __dynamic_cast(param_1,&INextBot::typeinfo,&Witch::typeinfo,0x1a3c);
if (iVar4 == 0) {
iVar4 = (**(code **)(*(int *)param_1 + 0xb4))(param_1);
if (iVar4 != *(int *)this) {
(**(code **)(*(int *)param_1 + 0x84))(param_1,*(int *)this);
*(int *)(this + 4) = *(int *)(this + 4) + 1;
}
}
}
}
}
return 1;
}
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.