L L4D2node

ForEachTerrorPlayer<ScrimmageUpdate>

0x009897e0 · 230 bytes · __cdecl

_Z19ForEachTerrorPlayerI15ScrimmageUpdateEbRT_

Decompiled

bool (1 param)

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

bool ForEachTerrorPlayer<ScrimmageUpdate>(ScrimmageUpdate *param_1)

{
  float fVar1;
  char cVar2;
  CBaseEntity *this;
  int iVar3;
  int iVar4;
  longdouble lVar5;
  CBaseEntity *local_28;
  float local_24;
  float local_20;
  
  iVar4 = 1;
  if (0 < *(int *)(gpGlobals + 0x14)) {
    do {
      this = (CBaseEntity *)UTIL_PlayerByIndex(iVar4);
      if ((((this != (CBaseEntity *)0x0) && (*(int *)(this + 0x30) != 0)) &&
          (*(int *)(this + 0x30) - *(int *)(gpGlobals + 0x58) >> 4 != 0)) &&
         (((cVar2 = (**(code **)(*(int *)this + 0x16c))(this), cVar2 != '\0' &&
           (*(int *)(this + 0x1f6c) != 2)) &&
          ((cVar2 = (**(code **)(*(int *)this + 300))(this), cVar2 == '\0' &&
           (iVar3 = CBaseEntity::GetTeamNumber(this), iVar3 == 3)))))) {
        lVar5 = (longdouble)CTerrorPlayer::GetLineOfScrimmageFlow((CTerrorPlayer *)this);
        fVar1 = (float)lVar5;
        if (0.0 < fVar1) {
          local_24 = fVar1 - *(float *)(param_1 + 4);
          local_20 = fVar1 - *(float *)(param_1 + 0xc);
          local_28 = this;
          CUtlVector<ScrimmageUpdate::PlayerFlowType,CUtlMemory<ScrimmageUpdate::PlayerFlowType,int>>
          ::InsertBefore((CUtlVector<ScrimmageUpdate::PlayerFlowType,CUtlMemory<ScrimmageUpdate::PlayerFlowType,int>>
                          *)(param_1 + 0x10),*(int *)(param_1 + 0x1c),(PlayerFlowType *)&local_28);
        }
      }
      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)