L L4D2node

Action<Hunter>::OnCommandResume

0x00a94430 · 1076 bytes · __thiscall

_ZN6ActionI6HunterE15OnCommandResumeEv

Decompiled

undefined (1 param)

/* Action<Hunter>::OnCommandResume() */

void __thiscall Action<Hunter>::OnCommandResume(Action<Hunter> *this)

{
  Action<Hunter> *pAVar1;
  float fVar2;
  int iVar3;
  code *pcVar4;
  int *piVar5;
  double *pdVar6;
  char cVar7;
  uint uVar8;
  uint uVar9;
  int *piVar10;
  undefined1 *puVar11;
  Action<Hunter> *pAVar12;
  double *pdVar13;
  uint *puVar14;
  int in_GS_OFFSET;
  uint auStack_84 [15];
  int *local_48;
  int *local_44;
  int *local_40;
  int local_34;
  int *local_30;
  undefined1 *local_2c;
  int local_28;
  undefined1 local_24;
  undefined1 local_23;
  undefined1 local_22;
  undefined1 local_21;
  int local_20;
  
  puVar14 = auStack_84 + 2;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pAVar12 = this;
  pdVar6 = (double *)(auStack_84 + 2);
  if (this[0x30] != (Action<Hunter>)0x0) {
    do {
      pdVar13 = pdVar6;
      iVar3 = *(int *)(this + 0x1c);
      uVar8 = 0;
      if (iVar3 != 0) {
        *(uint *)((int)pdVar13 + 4) = 0x80;
        *(int *)pdVar13 = iVar3 + 0x4028;
        *(undefined4 *)((int)pdVar13 + -4) = 0xa944be;
        cVar7 = INextBot::IsDebugging(*(INextBot **)pdVar13,*(uint *)((int)pdVar13 + 4));
        if ((cVar7 == '\0') && (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0)) {
          uVar8 = *(uint *)(this + 0x1c);
        }
        else {
          iVar3 = *(int *)pAVar12;
          *(Action<Hunter> **)pdVar13 = pAVar12;
          pcVar4 = *(code **)(iVar3 + 0xac);
          *(undefined4 *)((int)pdVar13 + -4) = 0xa944cd;
          uVar8 = (*pcVar4)();
          local_40 = (int *)(*(int *)(this + 8) + 0x11);
          iVar3 = **(int **)(this + 0x1c);
          *(int **)pdVar13 = *(int **)(this + 0x1c);
          pcVar4 = *(code **)(iVar3 + 0x9a4);
          *(undefined4 *)((int)pdVar13 + -4) = 0xa944e6;
          uVar9 = (*pcVar4)();
          fVar2 = *(float *)(gpGlobals + 0xc);
          *(uint *)(pdVar13 + 3) = uVar9;
          *(uint *)(pdVar13 + 4) = uVar8;
          *(char **)((int)pdVar13 + 0x24) = "OnCommandResume";
          *(int **)((int)pdVar13 + 0x1c) = local_40;
          pdVar13[2] = (double)fVar2;
          *(char **)((int)pdVar13 + 0xc) = "%3.2f: %s:%s: %s received EVENT %s\n";
          *(undefined1 **)(pdVar13 + 1) = &local_24;
          *(uint *)((int)pdVar13 + 4) = 0x80;
          local_24 = 100;
          local_23 = 100;
          local_22 = 100;
          local_21 = 0xff;
          *(int *)pdVar13 = *(int *)(this + 0x1c) + 0x4028;
          *(undefined4 *)((int)pdVar13 + -4) = 0xa94548;
          INextBot::DebugConColorMsg();
          uVar8 = *(uint *)(this + 0x1c);
        }
      }
      iVar3 = *(int *)pAVar12;
      *(uint *)(pdVar13 + 1) = uVar8;
      *(Action<Hunter> **)((int)pdVar13 + 4) = pAVar12;
      *(int **)pdVar13 = &local_34;
      pcVar4 = *(code **)(iVar3 + 0x150);
      *(undefined4 *)((int)pdVar13 + -4) = 0xa94486;
      (*pcVar4)();
      if (local_34 != 0) {
        iVar3 = *(int *)(this + 0x1c);
        piVar10 = local_30;
        if ((iVar3 != 0) && ((int *)(local_34 - 1U) < (int *)0x3)) {
          *(undefined4 *)pdVar13 = 1;
          *(int *)((int)pdVar13 + -4) = iVar3 + 0x4028;
          local_44 = local_30;
          *(undefined4 *)(pdVar13 + -1) = 0xa9463b;
          local_40 = (int *)(local_34 - 1U);
          cVar7 = INextBot::IsDebugging(*(INextBot **)((int)pdVar13 + -4),*(uint *)pdVar13);
          if ((cVar7 != '\0') ||
             (piVar10 = local_44, *(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) {
            local_48 = local_44;
            local_44 = local_40;
            local_40 = (int *)(*(int *)(this + 8) + 0x11);
            iVar3 = **(int **)(this + 0x1c);
            *(int **)((int)pdVar13 + -4) = *(int **)(this + 0x1c);
            pcVar4 = *(code **)(iVar3 + 0x9a4);
            *(undefined4 *)(pdVar13 + -1) = 0xa94672;
            uVar8 = (*pcVar4)();
            fVar2 = *(float *)(gpGlobals + 0xc);
            *(uint *)((int)pdVar13 + 0x14) = uVar8;
            *(int **)(pdVar13 + 3) = local_40;
            *(char **)(pdVar13 + 1) = "%3.2f: %s:%s: ";
            *(double *)((int)pdVar13 + 0xc) = (double)fVar2;
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(undefined4 *)pdVar13 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0;
            local_21 = 0xff;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0xa946c8;
            INextBot::DebugConColorMsg();
            iVar3 = *(int *)pAVar12;
            *(Action<Hunter> **)((int)pdVar13 + -4) = pAVar12;
            pcVar4 = *(code **)(iVar3 + 0xac);
            *(undefined4 *)(pdVar13 + -1) = 0xa946d3;
            uVar8 = (*pcVar4)();
            *(char **)(pdVar13 + 1) = "%s ";
            *(uint *)((int)pdVar13 + 0xc) = uVar8;
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(undefined4 *)pdVar13 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0xff;
            local_21 = 0xff;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0xa9470e;
            INextBot::DebugConColorMsg();
            *(char **)((int)pdVar13 + 0xc) = "OnCommandResume";
            *(char **)(pdVar13 + 1) = "reponded to EVENT %s with ";
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(undefined4 *)pdVar13 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0;
            local_21 = 0xff;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0xa9474d;
            INextBot::DebugConColorMsg();
            puVar11 = &DAT_00d539c2;
            local_40 = local_48;
            if (local_48 != (int *)0x0) {
              iVar3 = *local_48;
              *(int **)((int)pdVar13 + -4) = local_48;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar13 + -1) = 0xa9476d;
              puVar11 = (undefined1 *)(*pcVar4)();
            }
            uVar8 = *(uint *)(CSWTCH_3265 + (int)local_44 * 4);
            *(undefined1 **)(pdVar13 + 2) = puVar11;
            *(char **)(pdVar13 + 1) = "%s %s ";
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(undefined4 *)pdVar13 = 1;
            *(uint *)((int)pdVar13 + 0xc) = uVar8;
            local_24 = 0xff;
            local_23 = 0;
            local_22 = 0;
            local_21 = 0xff;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0xa947bc;
            INextBot::DebugConColorMsg();
            *(undefined **)(pdVar13 + 1) = &DAT_00c5799e;
            *(undefined4 *)pdVar13 = 1;
            local_24 = 0;
            local_23 = 0xff;
            puVar11 = &DAT_00d539c2;
            if (local_2c != (undefined1 *)0x0) {
              puVar11 = local_2c;
            }
            local_22 = 0;
            local_21 = 0xff;
            *(undefined1 **)((int)pdVar13 + 0xc) = puVar11;
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0xa94804;
            INextBot::DebugConColorMsg();
            piVar10 = local_40;
          }
        }
        if (*(int *)(pAVar12 + 0x2c) < local_28) {
          local_30 = piVar10;
          if (local_28 != 0) goto LAB_00a945df;
        }
        else {
          if ((local_28 != *(int *)(pAVar12 + 0x2c)) || (*(int *)(pAVar12 + 0x20) != 4)) {
            if ((local_28 == 3) && (*(int *)(developer._28_4_ + 0x30) != 0)) {
              iVar3 = *(int *)pAVar12;
              *(Action<Hunter> **)((int)pdVar13 + -4) = pAVar12;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar13 + -1) = 0xa94839;
              local_40 = piVar10;
              uVar8 = (*pcVar4)();
              *(char **)((int)pdVar13 + 0xc) = "OnCommandResume";
              *(uint *)(pdVar13 + 1) = uVar8;
              fVar2 = *(float *)(gpGlobals + 0xc);
              *(char **)((int)pdVar13 + -4) = "%3.2f: WARNING: %s::%s() RESULT_CRITICAL collision\n"
              ;
              *pdVar13 = (double)fVar2;
              *(undefined4 *)(pdVar13 + -1) = 0xa94864;
              DevMsg(*(char **)((int)pdVar13 + -4));
              piVar10 = local_40;
            }
            if (piVar10 != (int *)0x0) {
              iVar3 = *piVar10;
              *(int **)((int)pdVar13 + -4) = piVar10;
              pcVar4 = *(code **)(iVar3 + 4);
              *(undefined4 *)(pdVar13 + -1) = 0xa9456b;
              (*pcVar4)();
            }
            break;
          }
LAB_00a945df:
          piVar5 = *(int **)(pAVar12 + 0x24);
          local_30 = piVar10;
          if (piVar5 != (int *)0x0) {
            iVar3 = *piVar5;
            *(int **)((int)pdVar13 + -4) = piVar5;
            pcVar4 = *(code **)(iVar3 + 4);
            *(undefined4 *)(pdVar13 + -1) = 0xa945f1;
            local_40 = piVar10;
            (*pcVar4)();
            local_30 = local_40;
          }
        }
        *(int *)(pAVar12 + 0x20) = local_34;
        *(int **)(pAVar12 + 0x24) = local_30;
        *(undefined1 **)(pAVar12 + 0x28) = local_2c;
        *(int *)(pAVar12 + 0x2c) = local_28;
        iVar3 = *(int *)this;
        *(Action<Hunter> **)((int)pdVar13 + -4) = this;
        pcVar4 = *(code **)(iVar3 + 8);
        *(undefined4 *)(pdVar13 + -1) = 0xa94614;
        piVar10 = (int *)(*pcVar4)();
        goto joined_r0x00a94618;
      }
      pAVar1 = pAVar12 + 0x14;
      pAVar12 = *(Action<Hunter> **)pAVar1;
      pdVar6 = (double *)((int)pdVar13 + -4);
    } while (*(Action<Hunter> **)pAVar1 != (Action<Hunter> *)0x0);
    iVar3 = *(int *)this;
    *(Action<Hunter> **)((int)pdVar13 + -4) = this;
    pcVar4 = *(code **)(iVar3 + 8);
    *(undefined4 *)(pdVar13 + -1) = 0xa94573;
    piVar10 = (int *)(*pcVar4)();
joined_r0x00a94618:
    while (puVar14 = (uint *)((int)pdVar13 + -4), piVar10 != (int *)0x0) {
      iVar3 = *piVar10;
      *(int **)((int)pdVar13 + -4) = piVar10;
      pcVar4 = *(code **)(iVar3 + 0x9c);
      *(undefined4 *)(pdVar13 + -1) = 0xa945ab;
      (*pcVar4)();
      iVar3 = *(int *)this;
      *(int **)pdVar13 = piVar10;
      *(Action<Hunter> **)((int)pdVar13 + -4) = this;
      pcVar4 = *(code **)(iVar3 + 0xc);
      *(undefined4 *)(pdVar13 + -1) = 0xa945b7;
      piVar10 = (int *)(*pcVar4)();
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  puVar14[-1] = (uint)&UNK_00a94871;
  __stack_chk_fail();
}

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)