L L4D2node

SurvivorLiberateBesiegedFriend::OnStart

0x0091e330 · 297 bytes · __thiscall

_ZN30SurvivorLiberateBesiegedFriend7OnStartEP11SurvivorBotP6ActionIS0_E

Decompiled

undefined (3 params)

/* SurvivorLiberateBesiegedFriend::OnStart(SurvivorBot*, Action<SurvivorBot>*) */

void __thiscall
SurvivorLiberateBesiegedFriend::OnStart
          (SurvivorLiberateBesiegedFriend *this,SurvivorBot *param_1,Action *param_2)

{
  uint uVar1;
  int iVar2;
  SurvivorLegsApproach *this_00;
  int *piVar3;
  undefined4 *puVar4;
  undefined4 uVar5;
  undefined *puVar6;
  CBaseEntity *pCVar7;
  
  pCVar7 = (CBaseEntity *)0x0;
  uVar1 = *(uint *)(param_1 + 0x34);
  if (((uVar1 != 0xffffffff) &&
      (puVar6 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar6 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar6 + 8) == uVar1 >> 0xc)) {
    pCVar7 = *(CBaseEntity **)(puVar6 + 4);
  }
  this_00 = ::operator_new(0x9050);
                    /* try { // try from 0091e384 to 0091e388 has its CatchHandler @ 0091e468 */
  SurvivorLegsApproach::SurvivorLegsApproach(this_00,pCVar7);
  piVar3 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
  if (piVar3[0x18] < 0xf) {
    puVar4 = ::operator_new(0x38);
    *puVar4 = &PTR__Behavior_00d00308;
    puVar4[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 0091e3cd to 0091e3d1 has its CatchHandler @ 0091e47a */
    CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar4 + 3),"%s");
    puVar4[2] = this_00;
    iVar2 = piVar3[0x18];
    piVar3[0x18] = iVar2 + 1;
    piVar3[iVar2 + 9] = (int)puVar4;
  }
  else {
    piVar3 = (int *)(**(code **)(*piVar3 + 0xb0))(piVar3);
    uVar5 = (**(code **)(*piVar3 + 0x13c))(piVar3);
    DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar5);
    if (this_00 != (SurvivorLegsApproach *)0x0) {
      (**(code **)(*(int *)this_00 + 4))(this_00);
    }
  }
  param_1[0x48] = (SurvivorBot)0x1;
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return;
}

SourceMod gamedata

paste into addons/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.



        

        

          

Type inference is best-effort from the C signature - sanity-check the DHooks types before shipping.

Return-type handling cheatsheet (DHookReturn)