L L4D2node

CRagdollProp::TestCollision

0x007955e0 · 686 bytes · __thiscall

_ZN12CRagdollProp13TestCollisionERK5Ray_tjR10CGameTrace

Decompiled

undefined (4 params)

/* CRagdollProp::TestCollision(Ray_t const&, unsigned int, CGameTrace&) */

bool __thiscall
CRagdollProp::TestCollision(CRagdollProp *this,Ray_t *param_1,uint param_2,CGameTrace *param_3)

{
  code *pcVar1;
  int *piVar2;
  undefined2 uVar3;
  int *piVar4;
  undefined4 uVar5;
  bool bVar6;
  CRagdollProp *pCVar7;
  int iVar8;
  undefined **local_90;
  int local_8c;
  undefined1 local_88 [12];
  undefined1 local_7c [12];
  undefined4 local_70;
  undefined4 local_6c;
  undefined4 local_68;
  undefined4 local_64;
  undefined4 local_60;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  undefined4 local_50;
  undefined4 local_4c;
  CGameTrace local_48;
  CGameTrace local_47;
  undefined2 local_46;
  float local_44;
  undefined4 local_40;
  undefined2 local_3c;
  CGameTrace local_3a;
  CGameTrace local_39;
  undefined4 local_38;
  undefined4 local_34;
  undefined4 local_30;
  undefined4 local_2c;
  undefined2 local_28;
  undefined2 local_26;
  undefined4 local_24;
  undefined4 local_20;
  
  piVar2 = mdlcache;
  (**(code **)(*mdlcache + 0x68))(mdlcache);
  piVar4 = *(int **)(this + 0x13e0);
  if (piVar4 == (int *)0x0) {
                    /* try { // try from 00795870 to 00795883 has its CatchHandler @ 00795899 */
    iVar8 = CBaseEntity::GetModel((CBaseEntity *)this);
    if (iVar8 != 0) {
      CBaseAnimating::LockStudioHdr((CBaseAnimating *)this);
    }
    piVar4 = *(int **)(this + 0x13e0);
    if (piVar4 != (int *)0x0) goto LAB_00795615;
  }
  else {
LAB_00795615:
    if (*piVar4 != 0) {
      if (0 < *(int *)(this + 0x13f8)) {
        iVar8 = 0;
        pCVar7 = this + 0x1410;
        do {
          piVar4 = *(int **)pCVar7;
          if (piVar4 == (int *)0x0) {
            DevWarning("Bogus object in Ragdoll Prop\'s ragdoll list!\n");
          }
          else {
                    /* try { // try from 00795675 to 0079583a has its CatchHandler @ 00795899 */
            (**(code **)(*piVar4 + 0xc4))(piVar4,local_88,local_7c);
            if (*(int *)(pCVar7 + 4) == 0) {
              pcVar1 = *(code **)(*physcollision + 0x84);
              uVar5 = (**(code **)(**(int **)pCVar7 + 300))(*(int **)pCVar7);
              (*pcVar1)(physcollision,param_1,uVar5,local_88,local_7c,&local_70);
            }
            else {
              local_90 = &PTR_GetPhysics2Actor_00cb37b8;
              local_8c = *(int *)(pCVar7 + 4);
              (**(code **)(*physcollision + 0xec))
                        (physcollision,param_1,&local_90,local_88,local_7c,&local_70);
            }
            if (local_44 < *(float *)(param_3 + 0x2c)) {
              local_28 = (undefined2)iVar8;
              uVar3 = (**(code **)(**(int **)pCVar7 + 0x9c))(*(int **)pCVar7);
              local_30 = CONCAT22(local_30._2_2_,uVar3);
              *(undefined4 *)param_3 = local_70;
              param_3[0x28] = local_48;
              *(undefined4 *)(param_3 + 4) = local_6c;
              *(undefined4 *)(param_3 + 8) = local_68;
              param_3[0x29] = local_47;
              *(undefined4 *)(param_3 + 0xc) = local_64;
              *(undefined4 *)(param_3 + 0x10) = local_60;
              *(undefined2 *)(param_3 + 0x2a) = local_46;
              *(undefined4 *)(param_3 + 0x14) = local_5c;
              *(undefined4 *)(param_3 + 0x18) = local_58;
              *(undefined4 *)(param_3 + 0x30) = local_40;
              *(undefined4 *)(param_3 + 0x1c) = local_54;
              *(undefined4 *)(param_3 + 0x20) = local_50;
              *(undefined2 *)(param_3 + 0x34) = local_3c;
              *(undefined4 *)(param_3 + 0x24) = local_4c;
              *(float *)(param_3 + 0x2c) = local_44;
              param_3[0x36] = local_3a;
              param_3[0x37] = local_39;
              *(undefined4 *)(param_3 + 0x38) = local_38;
              *(undefined4 *)(param_3 + 0x40) = local_30;
              *(undefined4 *)(param_3 + 0x3c) = local_34;
              *(undefined4 *)(param_3 + 0x44) = local_2c;
              *(undefined2 *)(param_3 + 0x48) = local_28;
              *(undefined2 *)(param_3 + 0x4a) = local_26;
              *(undefined4 *)(param_3 + 0x4c) = local_24;
              *(undefined4 *)(param_3 + 0x50) = local_20;
            }
          }
          iVar8 = iVar8 + 1;
          pCVar7 = pCVar7 + 0x54;
        } while (iVar8 < *(int *)(this + 0x13f8));
      }
      bVar6 = *(float *)(param_3 + 0x2c) <= 1.0 && *(float *)(param_3 + 0x2c) != 1.0;
      goto LAB_0079584f;
    }
  }
  bVar6 = false;
LAB_0079584f:
  (**(code **)(*piVar2 + 0x6c))(piVar2);
  return bVar6;
}

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)