L L4D2node

TransferChildren

0x006d89f0 · 518 bytes · __cdecl

_Z16TransferChildrenP11CBaseEntityS0_

Decompiled

undefined (2 params)

/* TransferChildren(CBaseEntity*, CBaseEntity*) */

void TransferChildren(CBaseEntity *param_1,CBaseEntity *param_2)

{
  undefined *puVar1;
  uint uVar2;
  CBaseEntity *this;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  
  uVar2 = *(uint *)(param_1 + 0x18c);
  if ((((uVar2 == 0xffffffff) ||
       (puVar1 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar1 == (undefined *)0xfffffffc)) ||
      (*(uint *)(puVar1 + 8) != uVar2 >> 0xc)) ||
     (this = *(CBaseEntity **)(puVar1 + 4), this == (CBaseEntity *)0x0)) {
    return;
  }
  uVar2 = *(uint *)(this + 0x14c);
  if ((uVar2 & 0x800) != 0) goto LAB_006d8bac;
  do {
    local_40 = *(undefined4 *)(this + 0x2e0);
    local_3c = *(undefined4 *)(this + 0x2e4);
    local_38 = *(undefined4 *)(this + 0x2e8);
    while( true ) {
      local_34 = *(undefined4 *)(this + 0x37c);
      local_30 = *(undefined4 *)(this + 0x380);
      local_2c = *(undefined4 *)(this + 900);
      if ((uVar2 & 0x1000) != 0) {
        CBaseEntity::CalcAbsoluteVelocity(this);
      }
      local_28 = *(undefined4 *)(this + 0x274);
      local_24 = *(undefined4 *)(this + 0x278);
      local_20 = *(undefined4 *)(this + 0x27c);
      UnlinkChild(param_1,this);
      LinkChild(param_2,this);
      *(undefined4 *)(this + 0x2e0) = 0x7f7fffff;
      *(undefined4 *)(this + 0x2e4) = 0x7f7fffff;
      *(undefined4 *)(this + 0x2e8) = 0x7f7fffff;
      *(undefined4 *)(this + 0x37c) = 0x7f7fffff;
      *(undefined4 *)(this + 0x380) = 0x7f7fffff;
      *(undefined4 *)(this + 900) = 0x7f7fffff;
      *(undefined4 *)(this + 0x274) = 0x7f7fffff;
      *(undefined4 *)(this + 0x278) = 0x7f7fffff;
      *(undefined4 *)(this + 0x27c) = 0x7f7fffff;
      CBaseEntity::SetAbsOrigin(this,(Vector *)&local_40);
      CBaseEntity::SetAbsAngles(this,(QAngle *)&local_34);
      CBaseEntity::SetAbsVelocity(this,(Vector *)&local_28);
      uVar2 = *(uint *)(param_1 + 0x18c);
      if (uVar2 == 0xffffffff) {
        return;
      }
      puVar1 = g_pEntityList + (uVar2 & 0xfff) * 0x10;
      if (puVar1 == (undefined *)0xfffffffc) {
        return;
      }
      if (*(uint *)(puVar1 + 8) != uVar2 >> 0xc) {
        return;
      }
      this = *(CBaseEntity **)(puVar1 + 4);
      if (this == (CBaseEntity *)0x0) {
        return;
      }
      uVar2 = *(uint *)(this + 0x14c);
      if ((uVar2 & 0x800) == 0) break;
LAB_006d8bac:
      CBaseEntity::CalcAbsolutePosition(this);
      local_40 = *(undefined4 *)(this + 0x2e0);
      uVar2 = *(uint *)(this + 0x14c);
      local_3c = *(undefined4 *)(this + 0x2e4);
      local_38 = *(undefined4 *)(this + 0x2e8);
      if ((uVar2 & 0x800) != 0) {
        CBaseEntity::CalcAbsolutePosition(this);
        uVar2 = *(uint *)(this + 0x14c);
      }
    }
  } while( 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)