L L4D2node

CRagdollBoogie::AttachToEntity

0x008049c0 · 224 bytes · __thiscall

_ZN14CRagdollBoogie14AttachToEntityEP11CBaseEntity

Decompiled

undefined (2 params)

/* CRagdollBoogie::AttachToEntity(CBaseEntity*) */

void __thiscall CRagdollBoogie::AttachToEntity(CRagdollBoogie *this,CBaseEntity *param_1)

{
  uint uVar1;
  CBaseEntity *pCVar2;
  int iVar3;
  undefined *puVar4;
  undefined *puVar5;
  CBaseEntity *pCVar6;
  
  puVar4 = g_pEntityList;
  *(undefined4 *)(this + 0x44c) = 0;
  uVar1 = *(uint *)(param_1 + 0x18c);
  if (((uVar1 != 0xffffffff) &&
      (puVar5 = puVar4 + (uVar1 & 0xfff) * 0x10, puVar5 != (undefined *)0xfffffffc)) &&
     (*(uint *)(puVar5 + 8) == uVar1 >> 0xc)) {
    pCVar6 = *(CBaseEntity **)(puVar5 + 4);
    while (pCVar2 = pCVar6, pCVar2 != (CBaseEntity *)0x0) {
      uVar1 = *(uint *)(pCVar2 + 400);
      pCVar6 = (CBaseEntity *)0x0;
      if (((uVar1 != 0xffffffff) &&
          (puVar4 = puVar4 + (uVar1 & 0xfff) * 0x10, puVar4 != (undefined *)0xfffffffc)) &&
         (*(uint *)(puVar4 + 8) == uVar1 >> 0xc)) {
        pCVar6 = *(CBaseEntity **)(puVar4 + 4);
      }
      iVar3 = __dynamic_cast(pCVar2,&CBaseEntity::typeinfo,&typeinfo,0);
      puVar4 = g_pEntityList;
      if (iVar3 != 0) {
        *(undefined4 *)(this + 0x44c) = *(undefined4 *)(iVar3 + 0x44c);
        UTIL_Remove(pCVar2);
        puVar4 = g_pEntityList;
      }
    }
  }
  CBaseEntity::FollowEntity((CBaseEntity *)this,param_1,true);
  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)