L L4D2node

CRagdollProp::SetUnragdoll

0x00798350 · 215 bytes · __thiscall

_ZN12CRagdollProp12SetUnragdollEP14CBaseAnimating

Decompiled

undefined (2 params)

/* CRagdollProp::SetUnragdoll(CBaseAnimating*) */

void __thiscall CRagdollProp::SetUnragdoll(CRagdollProp *this,CBaseAnimating *param_1)

{
  uint uVar1;
  CBaseEdict *this_00;
  uint *puVar2;
  undefined *puVar3;
  int iVar4;
  uint uVar5;
  int iVar6;
  
  if (param_1 == (CBaseAnimating *)0x0) {
    uVar5 = 0xffffffff;
    iVar6 = 0;
  }
  else {
    puVar2 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    uVar5 = *puVar2;
    if (((uVar5 == 0xffffffff) ||
        (puVar3 = g_pEntityList + (uVar5 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
       (*(uint *)(puVar3 + 8) != uVar5 >> 0xc)) {
      iVar6 = 0;
    }
    else {
      iVar6 = *(int *)(puVar3 + 4);
    }
  }
  uVar1 = *(uint *)(this + 0x1ea4);
  if (((uVar1 == 0xffffffff) ||
      (puVar3 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar3 == (undefined *)0xfffffffc)) ||
     (*(uint *)(puVar3 + 8) != uVar1 >> 0xc)) {
    iVar4 = 0;
  }
  else {
    iVar4 = *(int *)(puVar3 + 4);
  }
  if (iVar6 == iVar4) {
    return;
  }
  if (this[0x6c] == (CRagdollProp)0x0) {
    this_00 = *(CBaseEdict **)(this + 0x30);
    if (this_00 != (CBaseEdict *)0x0) {
      *(uint *)this_00 = *(uint *)this_00 | 0x101;
      iVar6 = CBaseEdict::GetChangeAccessor(this_00);
      *(undefined2 *)(iVar6 + 2) = 0;
    }
    *(uint *)(this + 0x1ea4) = uVar5;
  }
  else {
    this[0x70] = (CRagdollProp)((byte)this[0x70] | 1);
    *(uint *)(this + 0x1ea4) = uVar5;
  }
  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)