SurvivorHealFriend::OnStart
0x00934040 · 548 bytes · __thiscall
_ZN18SurvivorHealFriend7OnStartEP11SurvivorBotP6ActionIS0_E
Decompiled
undefined (3 params)
/* SurvivorHealFriend::OnStart(SurvivorBot*, Action<SurvivorBot>*) */
void __thiscall
SurvivorHealFriend::OnStart(SurvivorHealFriend *this,SurvivorBot *param_1,Action *param_2)
{
uint uVar1;
int iVar2;
code *pcVar3;
SurvivorLegsApproach *this_00;
int *piVar4;
undefined4 *puVar5;
undefined4 uVar6;
undefined *puVar7;
CBaseEntity *pCVar8;
int in_GS_OFFSET;
CAI_Concept local_134 [8];
CFmtStrN<256> local_12c [5];
undefined1 local_127 [263];
int local_20;
pCVar8 = (CBaseEntity *)0x0;
local_20 = *(int *)(in_GS_OFFSET + 0x14);
uVar1 = *(uint *)(param_1 + 0x34);
if (((uVar1 != 0xffffffff) &&
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc)) &&
(*(uint *)(puVar7 + 8) == uVar1 >> 0xc)) {
pCVar8 = *(CBaseEntity **)(puVar7 + 4);
}
this_00 = ::operator_new(0x9050);
/* try { // try from 009340af to 009340b3 has its CatchHandler @ 0093426d */
SurvivorLegsApproach::SurvivorLegsApproach(this_00,pCVar8);
piVar4 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
if (piVar4[0x18] < 0xf) {
puVar5 = ::operator_new(0x38);
*puVar5 = &PTR__Behavior_00d00308;
puVar5[1] = &PTR__Behavior_00d003d0;
/* try { // try from 00934100 to 00934104 has its CatchHandler @ 00934285 */
CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar5 + 3),"%s");
puVar5[2] = this_00;
iVar2 = piVar4[0x18];
piVar4[0x18] = iVar2 + 1;
piVar4[iVar2 + 9] = (int)puVar5;
}
else {
piVar4 = (int *)(**(code **)(*piVar4 + 0xb0))(piVar4);
uVar6 = (**(code **)(*piVar4 + 0x13c))(piVar4);
DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar6);
if (this_00 != (SurvivorLegsApproach *)0x0) {
(**(code **)(*(int *)this_00 + 4))(this_00);
}
}
uVar1 = *(uint *)(param_1 + 0x34);
param_1[0x3c] = (SurvivorBot)0x1;
if (((uVar1 == 0xffffffff) ||
(puVar7 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar7 == (undefined *)0xfffffffc)) ||
(*(uint *)(puVar7 + 8) != uVar1 >> 0xc)) {
pCVar8 = (CBaseEntity *)0x0;
}
else {
pCVar8 = *(CBaseEntity **)(puVar7 + 4);
}
DescribeSubject(pCVar8);
CFmtStrN<256>::CFmtStrN(local_12c,"Subject:%s");
pcVar3 = *(code **)(*(int *)param_2 + 0x7b4);
CAI_Concept::CAI_Concept(local_134,"SurvivorBotMovingToHealFriend");
(*pcVar3)(param_2,local_134,1,local_127,0,0,0);
iVar2 = *(int *)(in_GS_OFFSET + 0x14);
*(undefined4 *)this = 0;
*(undefined4 *)(this + 4) = 0;
*(undefined4 *)(this + 8) = 0;
if (local_20 == iVar2) {
return;
}
/* WARNING: Subroutine does not return */
__stack_chk_fail();
}
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.