L L4D2node

CBaseEntityList::CEntInfoList::LinkBefore

0x0044a250 · 131 bytes · __thiscall

_ZN15CBaseEntityList12CEntInfoList10LinkBeforeEP8CEntInfoS2_

Decompiled

undefined (3 params)

/* CBaseEntityList::CEntInfoList::LinkBefore(CEntInfo*, CEntInfo*) */

void __thiscall
CBaseEntityList::CEntInfoList::LinkBefore(CEntInfoList *this,CEntInfo *param_1,CEntInfo *param_2)

{
  CEntInfo *pCVar1;
  int iVar2;
  
  pCVar1 = *(CEntInfo **)(param_2 + 8);
  if (param_2 == pCVar1) goto LAB_0044a27b;
  if (pCVar1 == (CEntInfo *)0x0) {
    *(undefined4 *)this = *(undefined4 *)(param_2 + 0xc);
    iVar2 = *(int *)(param_2 + 0xc);
    if (iVar2 == 0) goto LAB_0044a2d0;
LAB_0044a272:
    *(undefined4 *)(iVar2 + 8) = *(undefined4 *)(param_2 + 8);
  }
  else {
    *(undefined4 *)(pCVar1 + 0xc) = *(undefined4 *)(param_2 + 0xc);
    iVar2 = *(int *)(param_2 + 0xc);
    if (iVar2 != 0) goto LAB_0044a272;
LAB_0044a2d0:
    *(undefined4 *)(this + 4) = *(undefined4 *)(param_2 + 8);
  }
  *(CEntInfo **)(param_2 + 8) = param_2;
LAB_0044a27b:
  *(CEntInfo **)(param_2 + 0xc) = param_1;
  if (param_1 == (CEntInfo *)0x0) {
    *(undefined4 *)(param_2 + 8) = *(undefined4 *)(this + 4);
    *(CEntInfo **)(this + 4) = param_2;
    iVar2 = *(int *)(param_2 + 8);
  }
  else {
    *(undefined4 *)(param_2 + 8) = *(undefined4 *)(param_1 + 8);
    *(CEntInfo **)(param_1 + 8) = param_2;
    iVar2 = *(int *)(param_2 + 8);
  }
  if (iVar2 != 0) {
    *(CEntInfo **)(iVar2 + 0xc) = param_2;
    return;
  }
  *(CEntInfo **)this = 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)