L L4D2node

ConnectTier1Libraries

0x0004c080 · 201 bytes · __cdecl

_Z21ConnectTier1LibrariesPPFPvPKcPiEi

Decompiled

undefined (2 params)

/* ConnectTier1Libraries(void* (**)(char const*, int*), int) */

void ConnectTier1Libraries(_func_void_ptr_char_ptr_int_ptr *param_1,int param_2)

{
  int iVar1;
  
  if ((s_bConnected == '\0') && (s_bConnected = '\x01', 0 < param_2)) {
    iVar1 = 0;
    do {
      if (g_pCVar == 0) {
        g_pCVar = (**(code **)(param_1 + iVar1 * 4))("VEngineCvar007",0);
        cvar = g_pCVar;
      }
      if (g_pProcessUtils == 0) {
        g_pProcessUtils = (**(code **)(param_1 + iVar1 * 4))("VProcessUtils001",0);
      }
      if ((g_pPhysics2 == (int *)0x0) &&
         (g_pPhysics2 = (int *)(**(code **)(param_1 + iVar1 * 4))("Physics2 Interface v0.5",0),
         g_pPhysics2 != (int *)0x0)) {
        g_pPhysics2ResourceManager = (**(code **)(*g_pPhysics2 + 0x28))(g_pPhysics2);
      }
      iVar1 = iVar1 + 1;
    } while (iVar1 != 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)