L L4D2node

ForEachTerrorPlayer<TransitioningPlayerCounter>

0x0088d580 · 229 bytes · __cdecl

_Z19ForEachTerrorPlayerI26TransitioningPlayerCounterEbRT_

Decompiled

bool (1 param)

/* bool ForEachTerrorPlayer<TransitioningPlayerCounter>(TransitioningPlayerCounter&) */

bool ForEachTerrorPlayer<TransitioningPlayerCounter>(TransitioningPlayerCounter *param_1)

{
  int iVar1;
  int *piVar2;
  char cVar3;
  CTerrorPlayer *this;
  int iVar4;
  int iVar5;
  int iVar6;
  
  iVar6 = 1;
  if (0 < *(int *)(gpGlobals + 0x14)) {
    do {
      this = (CTerrorPlayer *)UTIL_PlayerByIndex(iVar6);
      if ((((this == (CTerrorPlayer *)0x0) || (*(int *)(this + 0x30) == 0)) ||
          (*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 == 0)) ||
         (((cVar3 = (**(code **)(*(int *)this + 0x16c))(this), cVar3 == '\0' ||
           (*(int *)(this + 0x1f6c) == 2)) ||
          (cVar3 = (**(code **)(*(int *)this + 0x778))(this), cVar3 != '\0')))) goto LAB_0088d5f6;
      cVar3 = CTerrorPlayer::IsTransitioned(this);
      if (cVar3 == '\0') {
        iVar4 = (**(code **)(*engine + 0x40))(engine,*(undefined4 *)(this + 0x30));
        iVar1 = *(int *)(*(int *)(TheDirector + 0x634) + 0x10);
        if (iVar1 < 1) goto LAB_0088d61c;
        piVar2 = *(int **)(*(int *)(TheDirector + 0x634) + 4);
        if (iVar4 != *piVar2) {
          iVar5 = 0;
          do {
            iVar5 = iVar5 + 1;
            if (iVar5 == iVar1) goto LAB_0088d61c;
          } while (iVar4 != piVar2[iVar5]);
          if (iVar5 == -1) goto LAB_0088d61c;
        }
      }
      else {
LAB_0088d61c:
        *(int *)param_1 = *(int *)param_1 + 1;
      }
LAB_0088d5f6:
      iVar6 = iVar6 + 1;
    } while (iVar6 <= *(int *)(gpGlobals + 0x14));
  }
  return true;
}

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)