L L4D2node

ForEachTerrorPlayer<MarkAsNotPresentAtSurvivalStart>

0x0050f010 · 219 bytes · __cdecl

_Z19ForEachTerrorPlayerI31MarkAsNotPresentAtSurvivalStartEbRT_b

Decompiled

bool (2 params)

/* bool ForEachTerrorPlayer<MarkAsNotPresentAtSurvivalStart>(MarkAsNotPresentAtSurvivalStart&, bool)
    */

bool ForEachTerrorPlayer<MarkAsNotPresentAtSurvivalStart>
               (MarkAsNotPresentAtSurvivalStart *param_1,bool param_2)

{
  CBaseEdict *this;
  char cVar1;
  int *piVar2;
  int iVar3;
  int iVar4;
  
  iVar4 = 1;
  if (0 < *(int *)(gpGlobals + 0x14)) {
    do {
      piVar2 = (int *)UTIL_PlayerByIndex(iVar4);
      if ((((piVar2 != (int *)0x0) && (piVar2[0xc] != 0)) &&
          (piVar2[0xc] - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
         ((cVar1 = (**(code **)(*piVar2 + 0x16c))(piVar2), cVar1 != '\0' && (piVar2[0x7db] != 2))))
      {
        if (param_2) {
          cVar1 = (**(code **)(*piVar2 + 0x778))(piVar2);
          if (cVar1 != '\0') goto LAB_0050f086;
          cVar1 = (char)piVar2[0xffc];
        }
        else {
          cVar1 = (char)piVar2[0xffc];
        }
        if (cVar1 != '\0') {
          if ((char)piVar2[0x1b] == '\0') {
            this = (CBaseEdict *)piVar2[0xc];
            if (this != (CBaseEdict *)0x0) {
              *(uint *)this = *(uint *)this | 0x101;
              iVar3 = CBaseEdict::GetChangeAccessor(this);
              *(undefined2 *)(iVar3 + 2) = 0;
            }
          }
          else {
            *(byte *)(piVar2 + 0x1c) = *(byte *)(piVar2 + 0x1c) | 1;
          }
          *(undefined1 *)(piVar2 + 0xffc) = 0;
        }
      }
LAB_0050f086:
      iVar4 = iVar4 + 1;
    } while (iVar4 <= *(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)