L L4D2node

CreateServerRagdollSubmodel

0x00799550 · 434 bytes · __cdecl

_Z27CreateServerRagdollSubmodelP14CBaseAnimatingPKcRK6VectorRK6QAnglei

Decompiled

undefined (5 params)

/* CreateServerRagdollSubmodel(CBaseAnimating*, char const*, Vector const&, QAngle const&, int) */

CBaseEntity *
CreateServerRagdollSubmodel
          (CBaseAnimating *param_1,char *param_2,Vector *param_3,QAngle *param_4,int param_5)

{
  CBaseEdict *this;
  code *pcVar1;
  CBaseEntity *this_00;
  undefined1 *puVar2;
  int iVar3;
  int iVar4;
  undefined1 *puVar5;
  undefined1 *local_3020;
  matrix3x4_t local_301c [6144];
  matrix3x4_t local_181c [6156];
  
  this_00 = (CBaseEntity *)
            CBaseEntity::CreateNoSpawn("prop_ragdoll",param_3,param_4,(CBaseEntity *)param_1);
  AllocPooledString((char *)&local_3020);
  puVar5 = local_3020;
  *(undefined1 **)(this_00 + 0x260) = local_3020;
  CBaseEntity::DispatchUpdateTransmitState(this_00);
  puVar2 = &DAT_00d539c2;
  if (puVar5 != (undefined1 *)0x0) {
    puVar2 = puVar5;
  }
  iVar3 = (**(code **)(*soundemitterbase + 0x88))(soundemitterbase,puVar2);
  if (iVar3 != *(int *)(this_00 + 0xf4)) {
    if (this_00[0x6c] == (CBaseEntity)0x0) {
      this = *(CBaseEdict **)(this_00 + 0x30);
      if (this != (CBaseEdict *)0x0) {
        *(uint *)this = *(uint *)this | 0x101;
        iVar4 = CBaseEdict::GetChangeAccessor(this);
        *(undefined2 *)(iVar4 + 2) = 0;
      }
    }
    else {
      this_00[0x70] = (CBaseEntity)((byte)this_00[0x70] | 1);
    }
    *(int *)(this_00 + 0xf4) = iVar3;
  }
  pcVar1 = *(code **)(*(int *)this_00 + 0x70);
  (**(code **)(*(int *)this_00 + 0x20))(&local_3020,this_00);
  puVar5 = &DAT_00d539c2;
  if (local_3020 != (undefined1 *)0x0) {
    puVar5 = local_3020;
  }
  (*pcVar1)(this_00,puVar5);
  CBaseAnimating::ResetSequence((CBaseAnimating *)this_00,0);
  (**(code **)(*(int *)this_00 + 0x98))(this_00,param_1,0xffffffff);
  (**(code **)(*(int *)this_00 + 0x35c))(this_00,local_301c,0x7ff00);
  (**(code **)(*(int *)this_00 + 0x98))(this_00,0,0xffffffff);
  memcpy(local_181c,local_301c,0x1800);
  CRagdollProp::InitRagdoll
            ((CRagdollProp *)this_00,(Vector *)&vec3_origin,-1,(Vector *)&vec3_origin,local_301c,
             local_181c,0.1,param_5,true,true);
  return this_00;
}

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)