L L4D2node

Mod_SetParent

0x00197b90 · 59 bytes · __cdecl

_Z13Mod_SetParentP7mnode_tS0_

Decompiled

undefined (2 params)

/* Mod_SetParent(mnode_t*, mnode_t*) */

void Mod_SetParent(mnode_t *param_1,mnode_t *param_2)

{
  int iVar1;
  mnode_t *pmVar2;
  
  iVar1 = *(int *)param_1;
  *(mnode_t **)(param_1 + 8) = param_2;
  while (iVar1 < 0) {
    Mod_SetParent(*(mnode_t **)(param_1 + 0x34),param_1);
    pmVar2 = *(mnode_t **)(param_1 + 0x38);
    iVar1 = *(int *)pmVar2;
    *(mnode_t **)(pmVar2 + 8) = param_1;
    param_1 = pmVar2;
  }
  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)