L L4D2node

SurvivorUseObject::OnStart

0x00937110 · 577 bytes · __thiscall

_ZN17SurvivorUseObject7OnStartEP11SurvivorBotP6ActionIS0_E

Decompiled

undefined (3 params)

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

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

{
  uint uVar1;
  CBaseEntity *pCVar2;
  int iVar3;
  SurvivorLegsApproach *pSVar4;
  int *piVar5;
  undefined4 *puVar6;
  undefined4 uVar7;
  undefined *puVar8;
  
  uVar1 = *(uint *)(param_1 + 0x34);
  if ((((uVar1 != 0xffffffff) &&
       (puVar8 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar8 != (undefined *)0xfffffffc)) &&
      (*(uint *)(puVar8 + 8) == uVar1 >> 0xc)) &&
     (pCVar2 = *(CBaseEntity **)(puVar8 + 4), pCVar2 != (CBaseEntity *)0x0)) {
    if (((vec3_origin == *(float *)(param_1 + 0x5c)) && (DAT_01053d4c == *(float *)(param_1 + 0x60))
        ) && (DAT_01053d50 == *(float *)(param_1 + 100))) {
      pSVar4 = ::operator_new(0x9050);
                    /* try { // try from 009371c2 to 009371c6 has its CatchHandler @ 0093736e */
      SurvivorLegsApproach::SurvivorLegsApproach(pSVar4,pCVar2);
      piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
      if (piVar5[0x18] < 0xf) {
        puVar6 = ::operator_new(0x38);
        *puVar6 = &PTR__Behavior_00d00308;
        puVar6[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 00937216 to 0093721a has its CatchHandler @ 009373b4 */
        CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar6 + 3),"%s");
        puVar6[2] = pSVar4;
        iVar3 = piVar5[0x18];
        piVar5[0x18] = iVar3 + 1;
        piVar5[iVar3 + 9] = (int)puVar6;
      }
      else {
        piVar5 = (int *)(**(code **)(*piVar5 + 0xb0))(piVar5);
        uVar7 = (**(code **)(*piVar5 + 0x13c))(piVar5);
        DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar7);
        if (pSVar4 != (SurvivorLegsApproach *)0x0) {
          (**(code **)(*(int *)pSVar4 + 4))(pSVar4);
        }
      }
    }
    else {
      pSVar4 = ::operator_new(0x9050);
                    /* try { // try from 00937250 to 00937254 has its CatchHandler @ 009373a2 */
      SurvivorLegsApproach::SurvivorLegsApproach(pSVar4,(Vector *)(param_1 + 0x5c));
      piVar5 = (int *)(**(code **)(*(int *)param_2 + 0x9a8))(param_2);
      if (piVar5[0x18] < 0xf) {
        puVar6 = ::operator_new(0x38);
        *puVar6 = &PTR__Behavior_00d00308;
        puVar6[1] = &PTR__Behavior_00d003d0;
                    /* try { // try from 009372a4 to 009372a8 has its CatchHandler @ 00937380 */
        CFmtStrN<32>::CFmtStrN((CFmtStrN<32> *)(puVar6 + 3),"%s");
        puVar6[2] = pSVar4;
        iVar3 = piVar5[0x18];
        piVar5[0x18] = iVar3 + 1;
        piVar5[iVar3 + 9] = (int)puVar6;
      }
      else {
        piVar5 = (int *)(**(code **)(*piVar5 + 0xb0))(piVar5);
        uVar7 = (**(code **)(*piVar5 + 0x13c))(piVar5);
        DevMsg("%3.2f: %s: PushLegsStack: Overflow\n",(double)*(float *)(gpGlobals + 0xc),uVar7);
        if (pSVar4 != (SurvivorLegsApproach *)0x0) {
          (**(code **)(*(int *)pSVar4 + 4))(pSVar4);
        }
      }
    }
  }
  *(undefined4 *)this = 0;
  *(undefined4 *)(this + 4) = 0;
  *(undefined4 *)(this + 8) = 0;
  return this;
}

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)