HunterLeapToCover::OnStart
0x00a9fc90 · 418 bytes · __thiscall
_ZN17HunterLeapToCover7OnStartEP6HunterP6ActionIS0_E
Decompiled
undefined (3 params)
/* HunterLeapToCover::OnStart(Hunter*, Action<Hunter>*) */
HunterLeapToCover * __thiscall
HunterLeapToCover::OnStart(HunterLeapToCover *this,Hunter *param_1,Action *param_2)
{
float fVar1;
int iVar2;
char cVar3;
CNavArea *pCVar4;
EscapeScan local_2c [4];
int local_28;
int local_24;
EscapeScan::EscapeScan(local_2c,(BossZombiePlayerBot *)param_2);
fVar1 = *(float *)(ZombieHunterLungeDistance._28_4_ + 0x2c);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
pCVar4 = (CNavArea *)(**(code **)(*(int *)param_2 + 0x52c))(param_2);
SearchSurroundingAreas<EscapeScan>(pCVar4,(Vector *)(param_2 + 0x2e0),local_2c,fVar1,0,-1);
if ((local_28 != 0) && (local_24 < 1)) {
*(int *)(param_1 + 0x34) = local_28;
cVar3 = INextBot::IsDebugging((INextBot *)(param_2 + 0x4028),1);
if (cVar3 != '\0') {
iVar2 = *(int *)(param_1 + 0x34);
if (((byte)param_2[0x14d] & 8) != 0) {
CBaseEntity::CalcAbsolutePosition((CBaseEntity *)param_2);
}
NDebugOverlay::HorzArrow
((Vector *)(param_2 + 0x2e0),(Vector *)(iVar2 + 0x2c),10.0,0xff,0xff,0,0xff,true,
10.0);
}
if (*(float *)(param_1 + 0x40) != -1.0) {
(**(code **)(*(int *)(param_1 + 0x38) + 4))(param_1 + 0x38,param_1 + 0x40);
*(undefined4 *)(param_1 + 0x40) = 0xbf800000;
}
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
param_1[0x44] = (Hunter)0x0;
return this;
}
*(undefined4 *)this = 3;
*(undefined4 *)(this + 4) = 0;
*(char **)(this + 8) = "No escape found!";
return this;
}
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.