L L4D2node

Action<SurvivorBot>::OnSpokeConcept

0x0090bf40 · 1165 bytes · __thiscall

_ZN6ActionI11SurvivorBotE14OnSpokeConceptEP20CBaseCombatCharacter11CAI_ConceptP11AI_Response

Decompiled

undefined (4 params)

/* Action<SurvivorBot>::OnSpokeConcept(CBaseCombatCharacter*, CAI_Concept, AI_Response*) */

void __thiscall
Action<SurvivorBot>::OnSpokeConcept
          (Action<SurvivorBot> *this,uint param_1,undefined2 *param_3,uint param_4)

{
  Action<SurvivorBot> *pAVar1;
  float fVar2;
  int iVar3;
  code *pcVar4;
  undefined4 uVar5;
  int *piVar6;
  double *pdVar7;
  char cVar8;
  uint uVar9;
  int *piVar10;
  undefined1 *puVar11;
  Action<SurvivorBot> *pAVar12;
  double *pdVar13;
  uint *puVar14;
  int in_GS_OFFSET;
  uint auStack_84 [13];
  int *local_50;
  uint local_4c;
  int *local_48;
  uint local_44;
  uint local_40;
  undefined2 local_3c [2];
  undefined4 local_38;
  uint 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_40 = param_1;
  local_44 = param_4;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  pAVar12 = this;
  pdVar7 = (double *)(auStack_84 + 2);
  if (this[0x30] != (Action<SurvivorBot>)0x0) {
    do {
      pdVar13 = pdVar7;
      iVar3 = *(int *)(this + 0x1c);
      uVar9 = 0;
      if (iVar3 != 0) {
        *(uint *)((int)pdVar13 + 4) = 0x80;
        *(int *)pdVar13 = iVar3 + 0x4028;
        *(undefined4 *)((int)pdVar13 + -4) = 0x90c002;
        cVar8 = INextBot::IsDebugging(*(INextBot **)pdVar13,*(uint *)((int)pdVar13 + 4));
        if ((cVar8 == '\0') && (*(int *)(NextBotDebugHistory._28_4_ + 0x30) == 0)) {
          uVar9 = *(uint *)(this + 0x1c);
        }
        else {
          iVar3 = *(int *)pAVar12;
          *(Action<SurvivorBot> **)pdVar13 = pAVar12;
          pcVar4 = *(code **)(iVar3 + 0xac);
          *(undefined4 *)((int)pdVar13 + -4) = 0x90c015;
          local_4c = (*pcVar4)();
          local_48 = (int *)(*(int *)(this + 8) + 0x11);
          iVar3 = **(int **)(this + 0x1c);
          *(int **)pdVar13 = *(int **)(this + 0x1c);
          pcVar4 = *(code **)(iVar3 + 0x9b8);
          *(undefined4 *)((int)pdVar13 + -4) = 0x90c02f;
          uVar9 = (*pcVar4)();
          fVar2 = *(float *)(gpGlobals + 0xc);
          *(uint *)(pdVar13 + 3) = uVar9;
          *(uint *)(pdVar13 + 4) = local_4c;
          *(char **)((int)pdVar13 + 0x24) = "OnSpokeConcept";
          pdVar13[2] = (double)fVar2;
          *(int **)((int)pdVar13 + 0x1c) = local_48;
          *(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) = 0x90c094;
          INextBot::DebugConColorMsg();
          uVar9 = *(uint *)(this + 0x1c);
        }
      }
      local_3c[0] = *param_3;
      pcVar4 = *(code **)(*(int *)pAVar12 + 0x114);
      local_38 = *(undefined4 *)(param_3 + 2);
      *(uint *)(pdVar13 + 1) = uVar9;
      *(uint **)pdVar13 = &local_34;
      *(Action<SurvivorBot> **)((int)pdVar13 + 4) = pAVar12;
      *(uint *)((int)pdVar13 + 0x14) = local_44;
      *(undefined2 **)(pdVar13 + 2) = local_3c;
      *(uint *)((int)pdVar13 + 0xc) = local_40;
      *(undefined4 *)((int)pdVar13 + -4) = 0x90bfca;
      (*pcVar4)();
      if (local_34 != 0) {
        local_4c = local_34;
        iVar3 = *(int *)(this + 0x1c);
        piVar10 = local_30;
        if (iVar3 != 0) {
          *(undefined4 *)pdVar13 = 1;
          *(int *)((int)pdVar13 + -4) = iVar3 + 0x4028;
          local_48 = local_30;
          *(undefined4 *)(pdVar13 + -1) = 0x90c166;
          cVar8 = INextBot::IsDebugging(*(INextBot **)((int)pdVar13 + -4),*(uint *)pdVar13);
          piVar10 = local_48;
          if (((cVar8 != '\0') || (*(int *)(NextBotDebugHistory._28_4_ + 0x30) != 0)) &&
             (auStack_84[0xc] = local_4c - 1, auStack_84[0xc] < 3)) {
            local_50 = local_48;
            local_48 = (int *)(*(int *)(this + 8) + 0x11);
            iVar3 = **(int **)(this + 0x1c);
            *(int **)((int)pdVar13 + -4) = *(int **)(this + 0x1c);
            pcVar4 = *(code **)(iVar3 + 0x9b8);
            *(undefined4 *)(pdVar13 + -1) = 0x90c1a9;
            uVar9 = (*pcVar4)();
            fVar2 = *(float *)(gpGlobals + 0xc);
            *(uint *)((int)pdVar13 + 0x14) = uVar9;
            *(char **)(pdVar13 + 1) = "%3.2f: %s:%s: ";
            *(double *)((int)pdVar13 + 0xc) = (double)fVar2;
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(int **)(pdVar13 + 3) = local_48;
            *(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) = 0x90c1ff;
            INextBot::DebugConColorMsg();
            iVar3 = *(int *)pAVar12;
            *(Action<SurvivorBot> **)((int)pdVar13 + -4) = pAVar12;
            pcVar4 = *(code **)(iVar3 + 0xac);
            *(undefined4 *)(pdVar13 + -1) = 0x90c20a;
            uVar9 = (*pcVar4)();
            *(char **)(pdVar13 + 1) = "%s ";
            *(uint *)((int)pdVar13 + 0xc) = uVar9;
            *(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) = 0x90c245;
            INextBot::DebugConColorMsg();
            *(char **)((int)pdVar13 + 0xc) = "OnSpokeConcept";
            *(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) = 0x90c284;
            INextBot::DebugConColorMsg();
            puVar11 = &DAT_00d539c2;
            local_48 = local_50;
            if (local_50 != (int *)0x0) {
              iVar3 = *local_50;
              *(int **)((int)pdVar13 + -4) = local_50;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar13 + -1) = 0x90c29e;
              puVar11 = (undefined1 *)(*pcVar4)();
            }
            *(undefined1 **)(pdVar13 + 2) = puVar11;
            *(char **)(pdVar13 + 1) = "%s %s ";
            *(undefined1 **)((int)pdVar13 + 4) = &local_24;
            *(undefined4 *)pdVar13 = 1;
            local_24 = 0xff;
            local_23 = 0;
            local_22 = 0;
            *(uint *)((int)pdVar13 + 0xc) = *(uint *)(CSWTCH_2937 + auStack_84[0xc] * 4);
            local_21 = 0xff;
            *(int *)((int)pdVar13 + -4) = *(int *)(this + 0x1c) + 0x4028;
            *(undefined4 *)(pdVar13 + -1) = 0x90c2ed;
            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) = 0x90c335;
            INextBot::DebugConColorMsg();
            piVar10 = local_48;
          }
        }
        if (*(int *)(pAVar12 + 0x2c) < local_28) {
          local_30 = piVar10;
          if (local_28 != 0) goto LAB_0090c348;
        }
        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<SurvivorBot> **)((int)pdVar13 + -4) = pAVar12;
              pcVar4 = *(code **)(iVar3 + 0xa4);
              *(undefined4 *)(pdVar13 + -1) = 0x90c3a7;
              local_48 = piVar10;
              uVar9 = (*pcVar4)();
              *(char **)((int)pdVar13 + 0xc) = "OnSpokeConcept";
              *(uint *)(pdVar13 + 1) = uVar9;
              fVar2 = *(float *)(gpGlobals + 0xc);
              *(char **)((int)pdVar13 + -4) = "%3.2f: WARNING: %s::%s() RESULT_CRITICAL collision\n"
              ;
              *pdVar13 = (double)fVar2;
              *(undefined4 *)(pdVar13 + -1) = 0x90c3d2;
              DevMsg(*(char **)((int)pdVar13 + -4));
              piVar10 = local_48;
            }
            if (piVar10 != (int *)0x0) {
              iVar3 = *piVar10;
              *(int **)((int)pdVar13 + -4) = piVar10;
              pcVar4 = *(code **)(iVar3 + 4);
              *(undefined4 *)(pdVar13 + -1) = 0x90c0bb;
              (*pcVar4)();
            }
            break;
          }
LAB_0090c348:
          piVar6 = *(int **)(pAVar12 + 0x24);
          local_30 = piVar10;
          if (piVar6 != (int *)0x0) {
            iVar3 = *piVar6;
            *(int **)((int)pdVar13 + -4) = piVar6;
            pcVar4 = *(code **)(iVar3 + 4);
            *(undefined4 *)(pdVar13 + -1) = 0x90c35a;
            local_48 = piVar10;
            (*pcVar4)();
            local_30 = local_48;
          }
        }
        local_34 = local_4c;
        *(int **)(pAVar12 + 0x24) = local_30;
        *(uint *)(pAVar12 + 0x20) = local_4c;
        *(undefined1 **)(pAVar12 + 0x28) = local_2c;
        *(int *)(pAVar12 + 0x2c) = local_28;
        break;
      }
      pAVar1 = pAVar12 + 0x14;
      pAVar12 = *(Action<SurvivorBot> **)pAVar1;
      pdVar7 = (double *)((int)pdVar13 + -4);
    } while (*(Action<SurvivorBot> **)pAVar1 != (Action<SurvivorBot> *)0x0);
    uVar5 = *(undefined4 *)(param_3 + 2);
    local_48 = (int *)CONCAT22(local_48._2_2_,*param_3);
    iVar3 = *(int *)this;
    *(Action<SurvivorBot> **)((int)pdVar13 + -4) = this;
    pcVar4 = *(code **)(iVar3 + 8);
    *(undefined4 *)(pdVar13 + -1) = 0x90c0d2;
    piVar10 = (int *)(*pcVar4)();
    while (puVar14 = (uint *)((int)pdVar13 + -4), piVar10 != (int *)0x0) {
      pcVar4 = *(code **)(*piVar10 + 0x60);
      *(int **)((int)pdVar13 + -4) = piVar10;
      local_3c[0] = local_48._0_2_;
      *(uint *)(pdVar13 + 1) = local_44;
      *(undefined2 **)((int)pdVar13 + 4) = local_3c;
      *(uint *)pdVar13 = local_40;
      *(undefined4 *)(pdVar13 + -1) = 0x90c12a;
      local_38 = uVar5;
      (*pcVar4)();
      iVar3 = *(int *)this;
      *(int **)pdVar13 = piVar10;
      *(Action<SurvivorBot> **)((int)pdVar13 + -4) = this;
      pcVar4 = *(code **)(iVar3 + 0xc);
      *(undefined4 *)(pdVar13 + -1) = 0x90c136;
      piVar10 = (int *)(*pcVar4)();
    }
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  puVar14[-1] = (uint)&UNK_0090c3df;
  __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)