L L4D2node

CDirector::FadeOutAfterDelay

0x00880e80 · 296 bytes · __thiscall

_ZN9CDirector17FadeOutAfterDelayEP11CBaseEntityff

Decompiled

undefined (4 params)

/* CDirector::FadeOutAfterDelay(CBaseEntity*, float, float) */

void __thiscall
CDirector::FadeOutAfterDelay(CDirector *this,CBaseEntity *param_1,float param_2,float param_3)

{
  int iVar1;
  uint uVar2;
  uint *puVar3;
  int iVar4;
  undefined *puVar5;
  uint *puVar6;
  int local_20;
  
  if (*(int *)(sv_tankpropfade._28_4_ + 0x30) != 0) {
    iVar1 = *(int *)(this + 0x158);
    if (0 < iVar1) {
      iVar4 = 0;
      puVar6 = *(uint **)(this + 0x14c);
      do {
        uVar2 = *puVar6;
        local_20 = (int)puVar6 - (int)*(uint **)(this + 0x14c);
        if (((uVar2 == 0xffffffff) ||
            (puVar5 = g_pEntityList + (uVar2 & 0xfff) * 0x10, puVar5 == (undefined *)0xfffffffc)) ||
           (*(uint *)(puVar5 + 8) != uVar2 >> 0xc)) {
          if (param_1 == (CBaseEntity *)0x0) goto LAB_00880f1a;
        }
        else if (param_1 == *(CBaseEntity **)(puVar5 + 4)) goto LAB_00880f1a;
        iVar4 = iVar4 + 1;
        puVar6 = puVar6 + 3;
      } while (iVar4 != iVar1);
    }
    local_20 = CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>>::
               InsertBefore((CUtlVector<CDirector::FadeOutInfo_t,CUtlMemory<CDirector::FadeOutInfo_t,int>>
                             *)(this + 0x14c),iVar1);
    local_20 = local_20 * 0xc;
    puVar6 = (uint *)(*(int *)(this + 0x14c) + local_20);
LAB_00880f1a:
    if (param_1 == (CBaseEntity *)0x0) {
      *puVar6 = 0xffffffff;
    }
    else {
      puVar3 = (uint *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
      *puVar6 = *puVar3;
    }
    iVar1 = gpGlobals;
    *(float *)(*(int *)(this + 0x14c) + 4 + local_20) = param_2 + *(float *)(gpGlobals + 0xc);
    *(float *)(*(int *)(this + 0x14c) + 8 + local_20) = param_3 + *(float *)(iVar1 + 0xc);
  }
  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)