L L4D2node

PropBreakableCapEdictsOnCreateAll

0x007fae00 · 367 bytes · __cdecl

_Z33PropBreakableCapEdictsOnCreateAlliP14IPhysicsObjectRK21breakablepropparams_tP11CBaseEntityi

Decompiled

undefined (5 params)

/* PropBreakableCapEdictsOnCreateAll(int, IPhysicsObject*, breakablepropparams_t const&,
   CBaseEntity*, int) */

undefined4
PropBreakableCapEdictsOnCreateAll
          (int param_1,IPhysicsObject *param_2,breakablepropparams_t *param_3,CBaseEntity *param_4,
          int param_5)

{
  code *pcVar1;
  int iVar2;
  int *piVar3;
  int iVar4;
  undefined4 uVar5;
  int **ppiVar6;
  int *local_60;
  int local_40;
  undefined4 local_30;
  undefined4 local_2c;
  undefined4 local_28;
  int local_24;
  undefined4 local_20;
  
  local_30 = 0;
  local_2c = 0;
  local_28 = 0;
  local_24 = 0;
  local_20 = 0;
                    /* try { // try from 007fae51 to 007faef4 has its CatchHandler @ 007faf94 */
  local_60 = (int *)0x7fae56;
  BreakModelList((CUtlVector *)&local_30,param_1,*(float *)(param_3 + 0x14),*(int *)(param_3 + 0x18)
                );
  ppiVar6 = (int **)&stack0xffffffa4;
  if (param_5 == -1) {
    if (local_24 == 0) {
      ppiVar6 = (int **)&stack0xffffffa4;
      if (param_4 != (CBaseEntity *)0x0) {
        local_60 = (int *)0x7faee0;
        piVar3 = (int *)__dynamic_cast();
        ppiVar6 = (int **)&stack0xffffffa4;
        if (piVar3 != (int *)0x0) {
          local_60 = (int *)0x7faef5;
          (**(code **)(*piVar3 + 0x54))();
          ppiVar6 = &local_60;
                    /* try { // try from 007faf04 to 007faf06 has its CatchHandler @ 007faf7f */
          if ((local_40 != 0) &&
             (local_60 = piVar3, iVar2 = (**(code **)(*piVar3 + 100))(), ppiVar6 = &local_60,
             iVar2 != 0)) {
            local_60 = piVar3;
            param_5 = (**(code **)(*piVar3 + 100))();
            ppiVar6 = &local_60;
            goto LAB_007fae5b;
          }
        }
      }
    }
    else {
      param_5 = 0;
      ppiVar6 = (int **)&stack0xffffffa4;
      if (0 < local_24) {
        iVar2 = 0;
        do {
                    /* try { // try from 007faf4e to 007faf77 has its CatchHandler @ 007faf94 */
          local_60 = (int *)0x7faf51;
          iVar4 = (**(code **)(*modelinfo + 0xc))();
          iVar2 = iVar2 + 1;
          param_5 = param_5 + (uint)(0 < iVar4);
          ppiVar6 = (int **)&stack0xffffffa4;
        } while (iVar2 < local_24);
        goto LAB_007fae5b;
      }
    }
  }
  else {
LAB_007fae5b:
    if (param_5 != 0) {
      iVar2 = *engine;
      *ppiVar6 = engine;
      pcVar1 = *(code **)(iVar2 + 0x50);
      ppiVar6[-1] = (int *)0x7fae70;
      iVar2 = (*pcVar1)();
      uVar5 = CONCAT31((int3)((uint)(param_5 + iVar2) >> 8),param_5 + iVar2 < 0x7c0);
      goto LAB_007fae7b;
    }
  }
  uVar5 = 1;
LAB_007fae7b:
  local_24 = 0;
  *ppiVar6 = &local_30;
  ppiVar6[-1] = (int *)0x7fae8d;
  CUtlMemory<breakmodel_t,int>::Purge((CUtlMemory<breakmodel_t,int> *)*ppiVar6);
  local_20 = local_30;
  *ppiVar6 = &local_30;
  ppiVar6[-1] = (int *)0x7fae9e;
  CUtlMemory<breakmodel_t,int>::Purge((CUtlMemory<breakmodel_t,int> *)*ppiVar6);
  return uVar5;
}

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)