L L4D2node

CLogicBranchList::DoTest

0x006eb860 · 362 bytes · __thiscall

_ZN16CLogicBranchList6DoTestEP11CBaseEntity

Decompiled

undefined (2 params)

/* CLogicBranchList::DoTest(CBaseEntity*) */

void __thiscall CLogicBranchList::DoTest(CLogicBranchList *this,CBaseEntity *param_1)

{
  uint *puVar1;
  uint uVar2;
  bool bVar3;
  bool bVar4;
  bool bVar5;
  uint *puVar6;
  undefined *puVar7;
  
  if (0 < *(int *)(this + 0x48c)) {
    puVar6 = *(uint **)(this + 0x480);
    puVar1 = puVar6 + *(int *)(this + 0x48c);
    bVar4 = false;
    bVar5 = false;
    do {
      while ((((bVar3 = bVar5, uVar2 = *puVar6, uVar2 != 0xffffffff &&
               (puVar7 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
              && (*(uint *)(puVar7 + 8) == uVar2 >> 0xc)) && (*(int *)(puVar7 + 4) != 0))) {
        if (*(char *)(*(int *)(puVar7 + 4) + 0x440) == '\0') {
          bVar3 = true;
        }
        else {
          bVar4 = true;
        }
        puVar6 = puVar6 + 1;
        bVar5 = bVar3;
        if (puVar6 == puVar1) goto LAB_006eb8f2;
      }
      puVar6 = puVar6 + 1;
      bVar3 = true;
      bVar5 = true;
    } while (puVar6 != puVar1);
LAB_006eb8f2:
    if ((!bVar3) && (bVar4)) {
      if (*(int *)(this + 0x494) == 1) {
        return;
      }
      COutputEvent::FireOutput((COutputEvent *)(this + 0x498),param_1,(CBaseEntity *)this,0.0);
      *(undefined4 *)(this + 0x494) = 1;
      return;
    }
    if ((!bVar4) && (bVar3)) {
      if (*(int *)(this + 0x494) == 2) {
        return;
      }
      COutputEvent::FireOutput((COutputEvent *)(this + 0x4b0),param_1,(CBaseEntity *)this,0.0);
      *(undefined4 *)(this + 0x494) = 2;
      return;
    }
  }
  if (*(int *)(this + 0x494) == 3) {
    return;
  }
  COutputEvent::FireOutput((COutputEvent *)(this + 0x4c8),param_1,(CBaseEntity *)this,0.0);
  *(undefined4 *)(this + 0x494) = 3;
  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)