L L4D2node

CRagdoll2::Init

0x004a25b0 · 438 bytes · __thiscall

_ZN9CRagdoll24InitEP11CBaseEntityS1_P10CStudioHdrRK6VectoriPK11matrix3x4_tS9_S9_ff

Decompiled

undefined (11 params)

/* CRagdoll2::Init(CBaseEntity*, CBaseEntity*, CStudioHdr*, Vector const&, int, matrix3x4_t const*,
   matrix3x4_t const*, matrix3x4_t const*, float, float) */

void __thiscall
CRagdoll2::Init(CRagdoll2 *this,CBaseEntity *param_1,CBaseEntity *param_2,CStudioHdr *param_3,
               Vector *param_4,int param_5,matrix3x4_t *param_6,matrix3x4_t *param_7,
               matrix3x4_t *param_8,float param_9,float param_10)

{
  int iVar1;
  longdouble lVar2;
  CBaseEntity *local_54;
  int local_50;
  CStudioHdr *local_4c;
  undefined4 local_48;
  undefined4 local_44;
  undefined4 local_40;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  int local_2c;
  matrix3x4_t *local_28;
  undefined4 local_24;
  undefined1 local_20;
  
  iVar1 = gpGlobals;
  *(undefined4 *)(this + 0x868) = 0;
  *(undefined4 *)(this + 0x8b8) = 0;
  local_54 = param_1;
  *(undefined4 *)(this + 0x888) = *(undefined4 *)(iVar1 + 0xc);
  *(float *)(this + 0x8a8) = param_10;
  local_48 = (**(code **)(*(int *)param_1 + 0x1c))(param_1);
  local_50 = (**(code **)(*modelinfo + 0x18))(modelinfo,local_48);
  if (local_50 != 0) {
    local_44 = 0;
    local_38 = *(undefined4 *)param_4;
    local_40 = 0;
    local_3c = 0;
    local_34 = *(undefined4 *)(param_4 + 4);
    local_4c = param_3;
    local_30 = *(undefined4 *)(param_4 + 8);
    local_2c = param_5;
    local_24 = 0x3f800000;
    local_20 = 0;
    local_28 = param_8;
    Create(this,(ragdollparams_t *)&local_54,(C_Infected *)0x0);
    (**(code **)(*(int *)this + 0xc))(this);
    ApplyAnimationVelocity(this,param_6,param_7,param_9);
    lVar2 = (longdouble)(**(code **)(*g_pPhys2World + 0xb0))(g_pPhys2World);
    *(float *)(this + 0x880) = (float)lVar2;
    *(float *)(this + 0x884) = (float)lVar2;
    CBaseEntity::VPhysicsSetObject(param_1,(IPhysicsObject *)0x0);
    CBaseEntity::VPhysicsSetObject(param_1,*(IPhysicsObject **)(this + 0x20));
    CBaseEntity::SetCollisionGroup(param_1,1);
    param_1[0x1bf] = (CBaseEntity)0x0;
    *(uint *)(param_1 + 0x14c) = *(uint *)(param_1 + 0x14c) | 0x40000;
    if ((*(int *)(this + 8) != 0) || (*(int *)(this + 0x8b8) != 0)) {
      (**(code **)(*g_pPhys2World + 0x9c))(g_pPhys2World,this + 4);
      (**(code **)(*(int *)this + 0x28))(this,param_1);
      s_globalCount = s_globalCount + 1;
      *(int *)(this + 0x8b4) = s_globalCount;
    }
  }
  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)