L L4D2node

CDirector::FadeOutOnAllTanksDead

0x00882340 · 162 bytes · __thiscall

_ZN9CDirector21FadeOutOnAllTanksDeadEP11CBaseEntity

Decompiled

undefined (2 params)

/* CDirector::FadeOutOnAllTanksDead(CBaseEntity*) */

void __thiscall CDirector::FadeOutOnAllTanksDead(CDirector *this,CBaseEntity *param_1)

{
  int iVar1;
  undefined4 *puVar2;
  undefined4 *puVar3;
  
  if (*(int *)(sv_tankpropfade._28_4_ + 0x30) == 0) {
    return;
  }
  iVar1 = *(int *)(this + 0x144);
  CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::GrowVector
            ((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)(this + 0x138)
             ,1);
  CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>>::ShiftElementsRight
            ((CUtlVector<CHandle<CBaseEntity>,CUtlMemory<CHandle<CBaseEntity>,int>> *)(this + 0x138)
             ,iVar1,1);
  iVar1 = iVar1 * 4;
  puVar3 = (undefined4 *)(iVar1 + *(int *)(this + 0x138));
  if (puVar3 == (undefined4 *)0x0) {
    puVar3 = (undefined4 *)0x0;
  }
  else {
    *puVar3 = 0xffffffff;
    puVar3 = (undefined4 *)(iVar1 + *(int *)(this + 0x138));
  }
  if (param_1 != (CBaseEntity *)0x0) {
    puVar2 = (undefined4 *)(**(code **)(*(int *)param_1 + 0xc))(param_1);
    *puVar3 = *puVar2;
    return;
  }
  *puVar3 = 0xffffffff;
  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)