L L4D2node

RagdollDestroy

0x004a4850 · 230 bytes · __cdecl

_Z14RagdollDestroyR9ragdoll_t

Decompiled

undefined (1 param)

/* RagdollDestroy(ragdoll_t&) */

void RagdollDestroy(ragdoll_t *param_1)

{
  ragdoll_t *prVar1;
  int iVar2;
  
  if (*(int *)param_1 != 0) {
    if (0 < *(int *)param_1) {
      prVar1 = param_1 + 0x20;
      iVar2 = 0;
      do {
        if (*(int *)prVar1 != 0) {
          (**(code **)(*physenv + 0x5c))(physenv,*(int *)prVar1);
          *(int *)prVar1 = 0;
        }
        if (*(int *)(prVar1 + 4) != 0) {
          (**(code **)(*g_pPhys2World + 0x24))(g_pPhys2World,*(int *)(prVar1 + 4));
        }
        iVar2 = iVar2 + 1;
        prVar1 = prVar1 + 0x54;
      } while (iVar2 < *(int *)param_1);
      if (0 < *(int *)param_1) {
        prVar1 = param_1 + 0x1c;
        iVar2 = 0;
        do {
          if (*(int *)prVar1 == 0) {
            if (*(int *)(prVar1 + -4) != 0) {
              (**(code **)(*physenv + 0x2c))(physenv,*(int *)(prVar1 + -4));
            }
          }
          else {
            (**(code **)(*g_pPhys2World + 8))(g_pPhys2World,*(int *)prVar1);
            *(int *)prVar1 = 0;
          }
          *(int *)(prVar1 + -4) = 0;
          iVar2 = iVar2 + 1;
          prVar1 = prVar1 + 0x54;
        } while (iVar2 < *(int *)param_1);
      }
    }
    if (*(int *)(param_1 + 8) != 0) {
      (**(code **)(*physenv + 100))(physenv,*(int *)(param_1 + 8));
    }
    *(undefined4 *)(param_1 + 8) = 0;
    *(undefined4 *)param_1 = 0;
  }
  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)