L L4D2node

Action<Boomer>::OnSound

0x00a6c3b0 · 1112 bytes · __thiscall

_ZN6ActionI6BoomerE7OnSoundEP11CBaseEntityRK6VectorP9KeyValues

Decompiled

undefined (4 params)

/* Action<Boomer>::OnSound(CBaseEntity*, Vector const&, KeyValues*) */

void __thiscall
Action<Boomer>::OnSound
          (Action<Boomer> *this,CBaseEntity *param_1,Vector *param_2,KeyValues *param_3)

{
  Action<Boomer> *pAVar1;
  float fVar2;
  int iVar3;
  code *pcVar4;
  int *piVar5;
  Vector *pVVar6;
  double *pdVar7;
  char cVar8;
  uint uVar9;
  uint uVar10;
  int *piVar11;
  undefined1 *puVar12;
  Action<Boomer> *pAVar13;
  double *pdVar14;
  uint *puVar15;
  int in_GS_OFFSET;
  uint auStack_84 [13];
  int *local_50;
  int *local_4c;
  Vector *local_48;
  KeyValues *local_44;
  CBaseEntity *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;
  
  puVar15 = auStack_84 + 2;
  local_40 = param_1;
  local_48 = param_2;
  local_44 = param_3;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pAVar13 = this;
  pdVar7 = (double *)(auStack_84 + 2);
  if (this[0x30] != (Action<Boomer>)0x0) {
    do {
      pdVar14 = pdVar7;
      iVar3 = *(int *)(this + 0x1c);
      uVar9 = 0;
      if (iVar3 != 0) {
        *(uint *)((int)pdVar14 + 4) = 0x80;
        *(int *)pdVar14 = iVar3 + 0x4028;
        *(undefined4 *)((int)pdVar14 + -4) = 0xa6c463;
        cVar8 = INextBot::IsDebugging(*(INextBot **)pdVar14,*(uint *)((int)pdVar14 + 4));
        if ((cVar8 == '\0') && (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0)) {
          uVar9 = *(uint *)(this + 0x1c);
        }
        else {
          iVar3 = *(int *)pAVar13;
          *(Action<Boomer> **)pdVar14 = pAVar13;
          pcVar4 = *(code **)(iVar3 + 0xac);
          *(undefined4 *)((int)pdVar14 + -4) = 0xa6c472;
          uVar9 = (*pcVar4)();
          local_4c = (int *)(*(int *)(this + 8) + 0x11);
          iVar3 = **(int **)(this + 0x1c);
          *(int **)pdVar14 = *(int **)(this + 0x1c);
          pcVar4 = *(code **)(iVar3 + 0x9a4);
          *(undefined4 *)((int)pdVar14 + -4) = 0xa6c48b;
          uVar10 = (*pcVar4)();
          fVar2 = *(float *)(gpGlobals + 0xc);
          *(uint *)(pdVar14 + 3) = uVar10;
          *(uint *)(pdVar14 + 4) = uVar9;
          *(char **)((int)pdVar14 + 0x24) = "OnSound";
          *(int **)((int)pdVar14 + 0x1c) = local_4c;
          pdVar14[2] = (double)fVar2;
          *(char **)((int)pdVar14 + 0xc) = "%3.2f: %s:%s: %s received EVENT %s\n";
          *(undefined1 **)(pdVar14 + 1) = &local_24;
          *(uint *)((int)pdVar14 + 4) = 0x80;
          local_24 = 100;
          local_23 = 100;
          local_22 = 100;
          local_21 = 0xff;
          *(int *)pdVar14 = *(int *)(this + 0x1c) + 0x4028;
          *(undefined4 *)((int)pdVar14 + -4) = 0xa6c4ed;
          INextBot::DebugConColorMsg();
          uVar9 = *(uint *)(this + 0x1c);
        }
      }
      iVar3 = *(int *)pAVar13;
      *(uint *)(pdVar14 + 1) = uVar9;
      *(Action<Boomer> **)((int)pdVar14 + 4) = pAVar13;
      *(int **)pdVar14 = &local_34;
      *(KeyValues **)((int)pdVar14 + 0x14) = local_44;
      *(CBaseEntity **)((int)pdVar14 + 0xc) = local_40;
      *(Vector **)(pdVar14 + 2) = local_48;
      pcVar4 = *(code **)(iVar3 + 0x110);
      *(undefined4 *)((int)pdVar14 + -4) = 0xa6c42b;
      (*pcVar4)();
      if (local_34 != 0) {
        iVar3 = *(int *)(this + 0x1c);
        piVar11 = local_30;
        if (iVar3 != 0) {
          *(undefined4 *)pdVar14 = 1;
          *(int *)((int)pdVar14 + -4) = iVar3 + 0x4028;
          local_4c = local_30;
          *(undefined4 *)(pdVar14 + -1) = 0xa6c593;
          cVar8 = INextBot::IsDebugging(*(INextBot **)((int)pdVar14 + -4),*(uint *)pdVar14);
          piVar11 = local_4c;
          if (((cVar8 != '\0') || (*(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) &&
             (auStack_84[0xc] = local_34 - 1, auStack_84[0xc] < 3)) {
            local_50 = local_4c;
            local_4c = (int *)(*(int *)(this + 8) + 0x11);
            iVar3 = **(int **)(this + 0x1c);
            *(int **)((int)pdVar14 + -4) = *(int **)(this + 0x1c);
            pcVar4 = *(code **)(iVar3 + 0x9a4);
            *(undefined4 *)(pdVar14 + -1) = 0xa6c5d3;
            uVar9 = (*pcVar4)();
            fVar2 = *(float *)(gpGlobals + 0xc);
            *(uint *)((int)pdVar14 + 0x14) = uVar9;
            *(int **)(pdVar14 + 3) = local_4c;
            *(char **)(pdVar14 + 1) = "%3.2f: %s:%s: ";
            *(double *)((int)pdVar14 + 0xc) = (double)fVar2;
            *(undefined1 **)((int)pdVar14 + 4) = &local_24;
            *(undefined4 *)pdVar14 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0;
            local_21 = 0xff;
            *(int *)((int)pdVar14 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar14 + -1) = 0xa6c629;
            INextBot::DebugConColorMsg();
            iVar3 = *(int *)pAVar13;
            *(Action<Boomer> **)((int)pdVar14 + -4) = pAVar13;
            pcVar4 = *(code **)(iVar3 + 0xac);
            *(undefined4 *)(pdVar14 + -1) = 0xa6c634;
            uVar9 = (*pcVar4)();
            *(char **)(pdVar14 + 1) = "%s ";
            *(uint *)((int)pdVar14 + 0xc) = uVar9;
            *(undefined1 **)((int)pdVar14 + 4) = &local_24;
            *(undefined4 *)pdVar14 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0xff;
            local_21 = 0xff;
            *(int *)((int)pdVar14 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar14 + -1) = 0xa6c66f;
            INextBot::DebugConColorMsg();
            *(char **)((int)pdVar14 + 0xc) = "OnSound";
            *(char **)(pdVar14 + 1) = "reponded to EVENT %s with ";
            *(undefined1 **)((int)pdVar14 + 4) = &local_24;
            *(undefined4 *)pdVar14 = 1;
            local_24 = 0xff;
            local_23 = 0xff;
            local_22 = 0;
            local_21 = 0xff;
            *(int *)((int)pdVar14 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar14 + -1) = 0xa6c6ae;
            INextBot::DebugConColorMsg();
            puVar12 = &DAT_00d539c2;
            local_4c = local_50;
            if (local_50 != (int *)0x0) {
              iVar3 = *local_50;
              *(int **)((int)pdVar14 + -4) = local_50;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar14 + -1) = 0xa6c6c8;
              puVar12 = (undefined1 *)(*pcVar4)();
            }
            *(undefined1 **)(pdVar14 + 2) = puVar12;
            *(char **)(pdVar14 + 1) = "%s %s ";
            *(undefined1 **)((int)pdVar14 + 4) = &local_24;
            uVar9 = *(uint *)(CSWTCH_3223 + auStack_84[0xc] * 4);
            *(undefined4 *)pdVar14 = 1;
            local_24 = 0xff;
            local_23 = 0;
            local_22 = 0;
            *(uint *)((int)pdVar14 + 0xc) = uVar9;
            local_21 = 0xff;
            *(int *)((int)pdVar14 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar14 + -1) = 0xa6c717;
            INextBot::DebugConColorMsg();
            *(undefined **)(pdVar14 + 1) = &DAT_00c5799e;
            *(undefined4 *)pdVar14 = 1;
            local_24 = 0;
            local_23 = 0xff;
            puVar12 = &DAT_00d539c2;
            if (local_2c != (undefined1 *)0x0) {
              puVar12 = local_2c;
            }
            local_22 = 0;
            local_21 = 0xff;
            *(undefined1 **)((int)pdVar14 + 0xc) = puVar12;
            *(undefined1 **)((int)pdVar14 + 4) = &local_24;
            *(int *)((int)pdVar14 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar14 + -1) = 0xa6c75f;
            INextBot::DebugConColorMsg();
            piVar11 = local_4c;
          }
        }
        if (*(int *)(pAVar13 + 0x2c) < local_28) {
          local_30 = piVar11;
          if (local_28 != 0) goto LAB_00a6c772;
        }
        else {
          if ((local_28 != *(int *)(pAVar13 + 0x2c)) || (*(int *)(pAVar13 + 0x20) != 4)) {
            if ((local_28 == 3) && (*(int *)(developer._28_4_ + 0x30) != 0)) {
              iVar3 = *(int *)pAVar13;
              *(Action<Boomer> **)((int)pdVar14 + -4) = pAVar13;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar14 + -1) = 0xa6c7e0;
              local_4c = piVar11;
              uVar9 = (*pcVar4)();
              *(char **)((int)pdVar14 + 0xc) = "OnSound";
              *(uint *)(pdVar14 + 1) = uVar9;
              fVar2 = *(float *)(gpGlobals + 0xc);
              *(char **)((int)pdVar14 + -4) = "%3.2f: WARNING: %s::%s() RESULT_CRITICAL collision\n"
              ;
              *pdVar14 = (double)fVar2;
              *(undefined4 *)(pdVar14 + -1) = 0xa6c80b;
              DevMsg(*(char **)((int)pdVar14 + -4));
              piVar11 = local_4c;
            }
            if (piVar11 != (int *)0x0) {
              iVar3 = *piVar11;
              *(int **)((int)pdVar14 + -4) = piVar11;
              pcVar4 = *(code **)(iVar3 + 4);
              *(undefined4 *)(pdVar14 + -1) = 0xa6c513;
              (*pcVar4)();
            }
            break;
          }
LAB_00a6c772:
          piVar5 = *(int **)(pAVar13 + 0x24);
          local_30 = piVar11;
          if (piVar5 != (int *)0x0) {
            iVar3 = *piVar5;
            *(int **)((int)pdVar14 + -4) = piVar5;
            pcVar4 = *(code **)(iVar3 + 4);
            *(undefined4 *)(pdVar14 + -1) = 0xa6c784;
            local_4c = piVar11;
            (*pcVar4)();
            local_30 = local_4c;
          }
        }
        *(int *)(pAVar13 + 0x20) = local_34;
        *(int **)(pAVar13 + 0x24) = local_30;
        *(undefined1 **)(pAVar13 + 0x28) = local_2c;
        *(int *)(pAVar13 + 0x2c) = local_28;
        iVar3 = *(int *)this;
        *(Action<Boomer> **)((int)pdVar14 + -4) = this;
        pcVar4 = *(code **)(iVar3 + 8);
        *(undefined4 *)(pdVar14 + -1) = 0xa6c7a7;
        piVar11 = (int *)(*pcVar4)();
        pVVar6 = local_48;
        goto joined_r0x00a6c7ab;
      }
      pAVar1 = pAVar13 + 0x14;
      pAVar13 = *(Action<Boomer> **)pAVar1;
      pdVar7 = (double *)((int)pdVar14 + -4);
    } while (*(Action<Boomer> **)pAVar1 != (Action<Boomer> *)0x0);
    iVar3 = *(int *)this;
    *(Action<Boomer> **)((int)pdVar14 + -4) = this;
    pcVar4 = *(code **)(iVar3 + 8);
    *(undefined4 *)(pdVar14 + -1) = 0xa6c51b;
    piVar11 = (int *)(*pcVar4)();
    pVVar6 = local_48;
joined_r0x00a6c7ab:
    while (puVar15 = (uint *)((int)pdVar14 + -4), piVar11 != (int *)0x0) {
      iVar3 = *piVar11;
      *(int **)((int)pdVar14 + -4) = piVar11;
      *(Vector **)((int)pdVar14 + 4) = pVVar6;
      *(KeyValues **)(pdVar14 + 1) = local_44;
      *(CBaseEntity **)pdVar14 = local_40;
      pcVar4 = *(code **)(iVar3 + 0x5c);
      *(undefined4 *)(pdVar14 + -1) = 0xa6c542;
      (*pcVar4)();
      iVar3 = *(int *)this;
      *(int **)pdVar14 = piVar11;
      *(Action<Boomer> **)((int)pdVar14 + -4) = this;
      pcVar4 = *(code **)(iVar3 + 0xc);
      *(undefined4 *)(pdVar14 + -1) = 0xa6c54e;
      piVar11 = (int *)(*pcVar4)();
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  puVar15[-1] = (uint)&UNK_00a6c818;
  __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)