L L4D2node

RescueAreaCollector::operator()

0x00970ed0 · 889 bytes · __thiscall

_ZN19RescueAreaCollectorclEP8CNavArea

Decompiled

undefined (2 params)

/* RescueAreaCollector::TEMPNAMEPLACEHOLDERVALUE(CNavArea*) */

undefined4 __thiscall RescueAreaCollector::operator()(RescueAreaCollector *this,CNavArea *param_1)

{
  int *piVar1;
  int iVar2;
  undefined4 uVar3;
  int iVar4;
  CNavArea *local_f4;
  CBasePropDoor *local_f0;
  undefined **local_ec;
  int *local_e8;
  int local_e4;
  undefined4 local_e0;
  float local_dc;
  float local_d8;
  float local_d4;
  float local_d0;
  float local_cc;
  float local_c8;
  float local_c4;
  float local_c0;
  float local_bc;
  float local_b8;
  float local_b4;
  float local_b0;
  int local_ac [16];
  float local_6c;
  float local_68;
  float local_64;
  undefined4 local_5c;
  undefined4 local_58;
  undefined4 local_54;
  float local_4c;
  float local_48;
  float local_44;
  float local_3c;
  float local_38;
  float local_34;
  undefined4 local_2c;
  undefined1 local_28;
  undefined1 local_27;
  
  iVar4 = *(int *)(this + 0xc);
  local_f4 = param_1;
  if (iVar4 < 1) {
LAB_00970f10:
    CUtlVector<TerrorNavArea*,CUtlMemory<TerrorNavArea*,int>>::InsertBefore
              ((CUtlVector<TerrorNavArea*,CUtlMemory<TerrorNavArea*,int>> *)this,iVar4,
               (TerrorNavArea **)&local_f4);
    CNavArea::GetExtent(local_f4,(Extent *)&local_dc);
    local_5c = 0;
    local_58 = 0;
    local_27 = 0;
    local_54 = 0;
    local_c8 = local_c8 + 71.0;
    local_2c = 0;
    local_3c = (local_d0 - local_dc) * 0.5;
    local_38 = (local_cc - local_d8) * 0.5;
    local_34 = (local_c8 - local_d4) * 0.5;
    local_44 = (local_c8 + local_d4) * 0.5;
    local_4c = (local_d0 + local_dc) * 0.5;
    local_48 = (local_cc + local_d8) * 0.5;
    local_64 = DAT_01053d50 + local_44;
    local_6c = vec3_origin + local_4c;
    local_4c = -local_4c;
    local_68 = DAT_01053d4c + local_48;
    local_48 = -local_48;
    local_28 = local_38 * local_38 + local_3c * local_3c + local_34 * local_34 < 1e-06;
    local_44 = -local_44;
    (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    (**(code **)(*g_pGameRules + 0x7c))(g_pGameRules);
    piVar1 = mdlcache;
    local_e4 = 0;
    local_e0 = 0x10;
    local_ec = &PTR_EnumElement_00cdaba8;
    local_e8 = local_ac;
    (**(code **)(*mdlcache + 0x68))(mdlcache);
                    /* try { // try from 009710f2 to 00971132 has its CatchHandler @ 00971253 */
    (**(code **)(*partition + 0x40))(partition,1,&local_6c,0,&local_ec);
    iVar4 = 0;
    if (0 < local_e4) {
      do {
        iVar2 = local_ac[iVar4];
        (**(code **)(*(int *)(iVar2 + 0x194) + 0x3c))(iVar2 + 0x194,&local_c4,&local_b8);
        if (((((local_dc <= local_b8) && (local_c4 <= local_d0)) && (local_d8 <= local_b4)) &&
            ((local_c0 <= local_cc && (local_d4 <= local_b0)))) && (local_bc <= local_c8)) {
          if ((local_ac[iVar4] != 0) &&
             (local_f0 = (CBasePropDoor *)
                         __dynamic_cast(local_ac[iVar4],&CBaseEntity::typeinfo,
                                        &CBasePropDoor::typeinfo,0),
             local_f0 != (CBasePropDoor *)0x0)) {
                    /* try { // try from 00971247 to 0097124b has its CatchHandler @ 00971253 */
            CUtlVector<CBasePropDoor*,CUtlMemory<CBasePropDoor*,int>>::InsertBefore
                      ((CUtlVector<CBasePropDoor*,CUtlMemory<CBasePropDoor*,int>> *)(this + 0x14),
                       *(int *)(this + 0x20),&local_f0);
          }
          uVar3 = 0;
          goto LAB_009711b4;
        }
        iVar4 = iVar4 + 1;
      } while (iVar4 < local_e4);
    }
    uVar3 = 1;
LAB_009711b4:
    (**(code **)(*piVar1 + 0x6c))(piVar1);
    return uVar3;
  }
  if (param_1 != (CNavArea *)**(int **)this) {
    iVar2 = 0;
    do {
      iVar2 = iVar2 + 1;
      if (iVar2 == iVar4) goto LAB_00970f10;
    } while (param_1 != (CNavArea *)(*(int **)this)[iVar2]);
    if (iVar2 < 0) goto LAB_00970f10;
  }
  return 0;
}

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)