L L4D2node

CRagdollLRURetirement::Update

0x0051e230 · 835 bytes · __cdecl

_ZN21CRagdollLRURetirement6UpdateEf

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* CRagdollLRURetirement::Update(float) */

void CRagdollLRURetirement::Update(float param_1)

{
  char cVar1;
  undefined2 *puVar2;
  int iVar3;
  int iVar4;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_28;
  undefined4 local_24;
  int local_20;
  
  local_34 = 0;
  local_30 = 0;
  if (___atan2f_finite == 0) {
    local_20 = 0;
  }
  else {
    (**(code **)(___atan2f_finite + 0x50))
              (___atan2f_finite,&local_34,0,0,0,0,
               "/data/src/game/server/../../game/shared/terror/terrorragdollmanager.cpp",0x158,
               &Update(float)::tm_fmt,"(%s)%s","Unaccounted","CRagdollLRURetirement::Update");
    local_20 = ___atan2f_finite;
  }
  iVar3 = _DAT_0105db00;
  local_28 = local_34;
  local_24 = local_30;
                    /* try { // try from 0051e446 to 0051e494 has its CatchHandler @ 0051e5ae */
  if (((_DAT_0105d154 != 0) || (DAT_0105d158 == '\0')) &&
     (iVar4 = ThreadGetCurrentId(), iVar3 == iVar4)) {
    if ((char *)*_DAT_0105d15c != "CRagdollLRURetirement::Update") {
      _DAT_0105d15c =
           (int *)CVProfNode::GetSubNode((char *)_DAT_0105d15c,0xc2d346,(char *)0x1,0xbfafa1);
    }
    CVProfNode::EnterScope();
    DAT_0105d158 = '\0';
  }
  *(undefined4 *)((int)param_1 + 0xb0) = 0;
  iVar3 = 0;
  *(undefined4 *)((int)param_1 + 0xb8) = 0;
  do {
                    /* try { // try from 0051e311 to 0051e42b has its CatchHandler @ 0051e58d */
    UpdateList((CRagdollLRURetirement *)param_1,iVar3,true,false);
    iVar3 = iVar3 + 1;
  } while (iVar3 != 5);
  iVar3 = *(int *)((int)param_1 + 0xac);
  if (iVar3 < 0) {
    iVar3 = *(int *)(g_ragdoll_maxcount._28_4_ + 0x30);
  }
  if (iVar3 < *(int *)((int)param_1 + 0xb4)) {
    *(undefined4 *)((int)param_1 + 0xb0) = 0;
    iVar4 = 0;
    do {
      UpdateList((CRagdollLRURetirement *)param_1,iVar4,false,false);
      iVar4 = iVar4 + 1;
    } while (iVar4 != 5);
    if (iVar3 < *(int *)((int)param_1 + 0xb4)) {
      *(undefined4 *)((int)param_1 + 0xb0) = 0;
      iVar3 = 0;
      do {
                    /* try { // try from 0051e55c to 0051e560 has its CatchHandler @ 0051e58d */
        UpdateList((CRagdollLRURetirement *)param_1,iVar3,false,true);
        iVar3 = iVar3 + 1;
      } while (iVar3 != 5);
    }
  }
  if (*(int *)(g_debug_ragdoll_removal._28_4_ + 0x30) != 0) {
    (**(code **)(*engine + 0xbc))(engine,0x1e,"%d simulated\n",*(undefined4 *)((int)param_1 + 0xb0))
    ;
    (**(code **)(*engine + 0xbc))(engine,0x1f,"%d total\n",*(undefined4 *)((int)param_1 + 0xb4));
    (**(code **)(*engine + 0xbc))(engine,0x20,"%d removed\n",*(undefined4 *)((int)param_1 + 0xb8));
    puVar2 = (undefined2 *)((int)param_1 + 0x1e);
    iVar3 = 0x21;
    do {
      iVar4 = iVar3 + 1;
      (**(code **)(*engine + 0xbc))(engine,iVar3,"%d\n",*puVar2);
      puVar2 = puVar2 + 0xe;
      iVar3 = iVar4;
    } while (iVar4 != 0x26);
  }
  iVar3 = _DAT_0105db00;
  if (((DAT_0105d158 == '\0') || (_DAT_0105d154 != 0)) &&
     (iVar4 = ThreadGetCurrentId(), iVar3 == iVar4)) {
    cVar1 = CVProfNode::ExitScope();
    if (cVar1 != '\0') {
      _DAT_0105d15c = (int *)_DAT_0105d15c[0x19];
    }
    DAT_0105d158 = _DAT_0105d15c == (int *)0x105d160;
  }
  if (local_20 != 0) {
    (**(code **)(local_20 + 0x54))(local_20,local_28,local_24,0,0,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)