L L4D2node

CBaseCombatCharacter::BecomeRagdoll

0x005f11f0 · 453 bytes · __thiscall

_ZN20CBaseCombatCharacter13BecomeRagdollERK15CTakeDamageInfoRK6Vector

Decompiled

undefined (3 params)

/* CBaseCombatCharacter::BecomeRagdoll(CTakeDamageInfo const&, Vector const&) */

undefined4 __thiscall
CBaseCombatCharacter::BecomeRagdoll
          (CBaseCombatCharacter *this,CTakeDamageInfo *param_1,Vector *param_2)

{
  undefined4 uVar1;
  float fVar2;
  char cVar3;
  undefined4 uVar4;
  int iVar5;
  float fVar6;
  undefined4 local_7c;
  undefined4 local_78;
  undefined4 local_74;
  undefined4 local_70;
  undefined4 local_6c;
  float local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  undefined4 local_48;
  undefined4 local_44;
  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;
  
  if (((byte)param_1[0x48] & 0x10) != 0) {
    cVar3 = (**(code **)(*g_pGameRules + 0x88))(g_pGameRules);
    if (cVar3 == '\0') {
      uVar4 = *(undefined4 *)(param_1 + 0xc);
      local_40 = *(undefined4 *)(param_1 + 0x3c);
      local_3c = *(undefined4 *)(param_1 + 0x40);
      uVar1 = *(undefined4 *)(param_1 + 0x10);
      local_38 = *(undefined4 *)(param_1 + 0x44);
      fVar2 = *(float *)(param_1 + 0x14);
      local_64 = *(undefined4 *)(param_1 + 0x18);
      local_60 = *(undefined4 *)(param_1 + 0x1c);
      local_5c = *(undefined4 *)(param_1 + 0x20);
      local_58 = *(undefined4 *)(param_1 + 0x24);
      local_54 = *(undefined4 *)(param_1 + 0x28);
      local_50 = *(undefined4 *)(param_1 + 0x2c);
      local_4c = *(undefined4 *)(param_1 + 0x30);
      local_48 = *(undefined4 *)(param_1 + 0x34);
      local_44 = *(undefined4 *)(param_1 + 0x38);
      local_34 = *(undefined4 *)(param_1 + 0x48);
      local_30 = *(undefined4 *)(param_1 + 0x4c);
      local_2c = *(undefined4 *)(param_1 + 0x50);
      local_24 = *(undefined4 *)(param_1 + 0x58);
      local_7c = *(undefined4 *)param_2;
      local_28 = *(undefined4 *)(param_1 + 0x54);
      local_78 = *(undefined4 *)(param_2 + 4);
      local_20 = *(undefined4 *)(param_1 + 0x5c);
      local_74 = *(undefined4 *)(param_2 + 8);
      local_70 = uVar4;
      local_6c = uVar1;
      local_68 = fVar2;
      if (((byte)this[0x14d] & 8) != 0) {
        CBaseEntity::CalcAbsolutePosition((CBaseEntity *)this);
      }
      fVar6 = *(float *)(this + 0x2e8);
      iVar5 = (**(code **)(*(int *)(this + 0x194) + 4))(this + 0x194);
      fVar6 = fVar6 + *(float *)(iVar5 + 8);
      if (fVar2 - fVar6 < 24.0) {
        local_68 = fVar6 + 24.0;
        local_70 = uVar4;
        local_6c = uVar1;
      }
      uVar4 = CreateServerRagdoll((CBaseAnimating *)this,*(int *)(this + 0x448),
                                  (CTakeDamageInfo *)&local_7c,3,true);
      (**(code **)(*(int *)this + 0x4e0))(this,uVar4);
      CBaseEntity::RemoveDeferred((CBaseEntity *)this);
      return 1;
    }
  }
  uVar4 = (**(code **)(*(int *)this + 0x348))(this,param_2);
  return uVar4;
}

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)