L L4D2node

SimThink_ListCopy

0x0067b6f0 · 85 bytes · __cdecl

_Z17SimThink_ListCopyPP11CBaseEntityi

Decompiled

undefined (2 params)

/* SimThink_ListCopy(CBaseEntity**, int) */

void SimThink_ListCopy(CBaseEntity **param_1,int param_2)

{
  ushort *puVar1;
  int iVar2;
  int iVar3;
  
  if ((int)g_SimThinkManager._8208_4_ < param_2) {
    param_2 = g_SimThinkManager._8208_4_;
  }
  iVar2 = 0;
  if (0 < param_2) {
    iVar3 = 0;
    do {
      puVar1 = (ushort *)(g_SimThinkManager._8196_4_ + iVar3 * 8);
      if (*(int *)(puVar1 + 2) <= *(int *)(gpGlobals + 0x18)) {
        param_1[iVar2] = *(CBaseEntity **)(gEntList + (uint)*puVar1 * 0x10 + 4);
        iVar2 = iVar2 + 1;
      }
      iVar3 = iVar3 + 1;
    } while (iVar3 != param_2);
  }
  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)