L L4D2node

CTonemapSystem::LevelInitPostEntity

0x00696f80 · 349 bytes · __thiscall

_ZN14CTonemapSystem19LevelInitPostEntityEv

Decompiled

undefined (1 param)

/* CTonemapSystem::LevelInitPostEntity() */

void __thiscall CTonemapSystem::LevelInitPostEntity(CTonemapSystem *this)

{
  uint uVar1;
  undefined4 *puVar2;
  CBaseEntity *pCVar3;
  undefined *puVar4;
  CBaseEntity *pCVar5;
  
  pCVar5 = (CBaseEntity *)0x0;
  while( true ) {
    pCVar5 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassname
                       ((CGlobalEntityList *)gEntList,pCVar5,"env_tonemap_controller");
    pCVar3 = (CBaseEntity *)0x0;
    if (pCVar5 == (CBaseEntity *)0x0) break;
    uVar1 = *(uint *)(this + 0xc);
    if ((((uVar1 == 0xffffffff) ||
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
       ((*(int *)(puVar4 + 4) == 0 || (((byte)pCVar5[0x148] & 1) != 0)))) {
      puVar2 = (undefined4 *)(**(code **)(*(int *)pCVar5 + 0xc))(pCVar5);
      *(undefined4 *)(this + 0xc) = *puVar2;
    }
  }
  while( true ) {
    pCVar3 = (CBaseEntity *)
             CGlobalEntityList::FindEntityByClassname
                       ((CGlobalEntityList *)gEntList,pCVar3,"env_tonemap_controller_infected");
    pCVar5 = (CBaseEntity *)0x0;
    if (pCVar3 == (CBaseEntity *)0x0) break;
    uVar1 = *(uint *)(this + 0x10);
    if (((uVar1 == 0xffffffff) ||
        (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
       ((*(uint *)(puVar4 + 8) != uVar1 >> 0xc ||
        ((*(int *)(puVar4 + 4) == 0 || (((byte)pCVar3[0x148] & 1) != 0)))))) {
      puVar2 = (undefined4 *)(**(code **)(*(int *)pCVar3 + 0xc))(pCVar3);
      *(undefined4 *)(this + 0x10) = *puVar2;
    }
  }
  while (pCVar5 = (CBaseEntity *)
                  CGlobalEntityList::FindEntityByClassname
                            ((CGlobalEntityList *)gEntList,pCVar5,"env_tonemap_controller_ghost"),
        pCVar5 != (CBaseEntity *)0x0) {
    uVar1 = *(uint *)(this + 0x14);
    if ((((uVar1 == 0xffffffff) ||
         (puVar4 = g_pEntityList + (uVar1 & 0xfff) * 0x10, puVar4 == (undefined *)0xfffffffc)) ||
        (*(uint *)(puVar4 + 8) != uVar1 >> 0xc)) ||
       ((*(int *)(puVar4 + 4) == 0 || (((byte)pCVar5[0x148] & 1) != 0)))) {
      puVar2 = (undefined4 *)(**(code **)(*(int *)pCVar5 + 0xc))(pCVar5);
      *(undefined4 *)(this + 0x14) = *puVar2;
    }
  }
  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)