L L4D2node

CDirector::FadeOutQueuedEntities

0x00877680 · 455 bytes · __thiscall

_ZN9CDirector21FadeOutQueuedEntitiesEv

Decompiled

undefined (1 param)

/* CDirector::FadeOutQueuedEntities() */

void __thiscall CDirector::FadeOutQueuedEntities(CDirector *this)

{
  float fVar1;
  int iVar2;
  uint uVar3;
  CBaseEntity *this_00;
  bool bVar4;
  undefined4 *puVar5;
  uint *puVar6;
  undefined *puVar7;
  int iVar8;
  int iVar9;
  int iVar10;
  undefined4 local_3c;
  undefined4 local_38;
  undefined4 local_34;
  float local_30;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  float local_20;
  
  iVar2 = *(int *)(fade_immediately._28_4_ + 0x30);
  iVar8 = *(int *)(this + 0x158) + -1;
  if (-1 < iVar8) {
    iVar10 = iVar8 * 0xc;
    do {
      while( true ) {
        puVar6 = (uint *)(*(int *)(this + 0x14c) + iVar10);
        uVar3 = *puVar6;
        if ((((uVar3 != 0xffffffff) &&
             (puVar7 = g_pEntityList + (uVar3 & 0xfff) * 0x10, puVar7 != (undefined *)0xfffffffc))
            && (*(uint *)(puVar7 + 8) == uVar3 >> 0xc)) &&
           (this_00 = *(CBaseEntity **)(puVar7 + 4), this_00 != (CBaseEntity *)0x0)) break;
LAB_008776c0:
        CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>>::FastRemove
                  ((CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>> *)
                   (this + 0x14c),iVar8);
LAB_008776cf:
        iVar8 = iVar8 + -1;
        iVar10 = iVar10 + -0xc;
        if (iVar8 == -1) goto LAB_008777c0;
      }
      if ((iVar2 != 0) ||
         (fVar1 = *(float *)(gpGlobals + 0xc),
         (float)puVar6[2] <= fVar1 && fVar1 != (float)puVar6[2])) {
LAB_00877840:
        CBaseEntity::SUB_StartFadeOutInstant(this_00);
        goto LAB_008776c0;
      }
      if (fVar1 < (float)puVar6[1]) goto LAB_008776cf;
      fVar1 = *(float *)(this_00 + 0x1b8);
      puVar5 = (undefined4 *)(**(code **)(*(int *)this_00 + 0x288))(this_00);
      local_3c = *puVar5;
      local_30 = fVar1 * fVar1;
      local_38 = puVar5[1];
      local_34 = puVar5[2];
      bVar4 = ForEachPlayer<TestInViewCone>((TestInViewCone *)&local_3c);
      if (!bVar4) {
        fVar1 = *(float *)(this_00 + 0x1b8);
        puVar5 = (undefined4 *)(**(code **)(*(int *)this_00 + 0x288))(this_00);
        local_2c = *puVar5;
        local_20 = (fVar1 + 384.0) * (fVar1 + 384.0);
        local_28 = puVar5[1];
        local_24 = puVar5[2];
        bVar4 = ForEachPlayer<TestDistance>((TestDistance *)&local_2c);
        if (bVar4) goto LAB_00877840;
        goto LAB_008776cf;
      }
      iVar10 = iVar10 + -0xc;
      UTIL_Remove(this_00);
      iVar9 = iVar8 + -1;
      CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>>::FastRemove
                ((CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>> *)
                 (this + 0x14c),iVar8);
      iVar8 = iVar9;
    } while (iVar9 != -1);
  }
LAB_008777c0:
  ConVar::SetValue(0x1000100);
  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)