L L4D2node

CHLTVDirector::StartCameraManShot

0x006db8a0 · 261 bytes · __thiscall

_ZN13CHLTVDirector18StartCameraManShotEv

Decompiled

undefined (1 param)

/* CHLTVDirector::StartCameraManShot() */

undefined4 __thiscall CHLTVDirector::StartCameraManShot(CHLTVDirector *this)

{
  ushort uVar1;
  uint uVar2;
  char *pcVar3;
  int iVar4;
  undefined4 uVar5;
  int iVar6;
  
  uVar2 = FindFirstEvent(this,*(int *)(this + 0x38));
  if (uVar2 != 0xffff) {
    uVar2 = uVar2 & 0xffff;
    iVar6 = *(int *)(this + 0x1d4) + uVar2 * 0x14;
    if (*(int *)(iVar6 + 8) <= *(int *)(this + 0x1c)) {
      do {
        pcVar3 = (char *)(**(code **)(**(int **)(iVar6 + 0x10) + 8))(*(int **)(iVar6 + 0x10));
        iVar4 = _V_strcmp(pcVar3,"hltv_cameraman");
        if ((iVar4 == 0) &&
           (iVar4 = (**(code **)(**(int **)(iVar6 + 0x10) + 0x1c))
                              (*(int **)(iVar6 + 0x10),"index",0), 0 < iVar4)) {
          uVar5 = (**(code **)(**(int **)(iVar6 + 0x10) + 0x1c))(*(int **)(iVar6 + 0x10),"index",0);
          *(undefined4 *)(this + 0x30) = uVar5;
          *(undefined4 *)(this + 0x20) = uVar5;
          *(int *)(this + 0x38) = *(int *)(this + 0x1c) + 1;
          (**(code **)(**(int **)(this + 0x14) + 0x2c))
                    (*(int **)(this + 0x14),*(undefined4 *)(iVar6 + 0x10));
          return 1;
        }
        uVar1 = CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
                ::NextInorder((CUtlRBTree<CGameEvent,unsigned_short,bool(*)(CGameEvent_const&,CGameEvent_const&),CUtlMemory<UtlRBTreeNode_t<CGameEvent,unsigned_short>,unsigned_short>>
                               *)(this + 0x1d0),(ushort)uVar2);
        if (uVar1 == 0xffff) {
          return 0;
        }
        uVar2 = (uint)uVar1;
        iVar6 = *(int *)(this + 0x1d4) + uVar2 * 0x14;
      } while (*(int *)(iVar6 + 8) <= *(int *)(this + 0x1c));
    }
  }
  return 0;
}

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)