L L4D2node

CDirectorItemManager::OnHealthCabinetOpened

0x008a4420 · 402 bytes · __thiscall

_ZN20CDirectorItemManager21OnHealthCabinetOpenedEP11CBaseEntity

Decompiled

undefined (2 params)

/* CDirectorItemManager::OnHealthCabinetOpened(CBaseEntity*) */

void __thiscall
CDirectorItemManager::OnHealthCabinetOpened(CDirectorItemManager *this,CBaseEntity *param_1)

{
  float fVar1;
  float fVar2;
  uint uVar3;
  int *piVar4;
  int iVar5;
  float *pfVar6;
  undefined *puVar7;
  int iVar8;
  int iVar9;
  float local_4c;
  float local_48;
  float local_44;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  (**(code **)(*(int *)(param_1 + 0x194) + 0x3c))(param_1 + 0x194,&local_4c,&local_40);
  iVar8 = *(int *)(this + 0x24);
  iVar9 = iVar8 * 8;
  if (iVar8 < *(int *)(this + 0x1c)) {
    do {
      iVar5 = *(int *)(this + 0x10);
      uVar3 = *(uint *)(iVar5 + iVar9);
      if ((((((uVar3 != 0xffffffff) &&
             (puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) &&
           ((piVar4 = *(int **)(puVar7 + 4), piVar4 != (int *)0x0 &&
            ((**(code **)(piVar4[0x65] + 0x3c))(piVar4 + 0x65,&local_34,&local_28),
            local_4c <= local_28)))) &&
          ((local_34 <= local_40 && ((local_48 <= local_24 && (local_30 <= local_3c)))))) &&
         ((local_44 <= local_20 && (local_2c <= local_38)))) {
        *(uint *)(iVar5 + iVar9) = 0xffffffff;
        iVar5 = (**(code **)(*piVar4 + 0x288))(piVar4);
        fVar1 = *(float *)(iVar5 + 8);
        iVar5 = (**(code **)(*piVar4 + 0x288))(piVar4);
        fVar2 = *(float *)(iVar5 + 4);
        pfVar6 = (float *)(**(code **)(*piVar4 + 0x288))(piVar4);
        DevMsg("Pills inside opening cabinet visible to team at ( %3.2f, %3.2f, %3.2f )\n",
               (double)*pfVar6,(double)fVar2,(double)fVar1);
      }
      iVar8 = iVar8 + 1;
      iVar9 = iVar9 + 8;
    } while (iVar8 < *(int *)(this + 0x1c));
  }
  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)