L L4D2node

CInfoDirector::InputOpenJournalForWrite

0x0087eb40 · 197 bytes · __thiscall

_ZN13CInfoDirector24InputOpenJournalForWriteER11inputdata_t

Decompiled

undefined (2 params)

/* CInfoDirector::InputOpenJournalForWrite(inputdata_t&) */

void __thiscall CInfoDirector::InputOpenJournalForWrite(CInfoDirector *this,inputdata_t *param_1)

{
  CUtlVector<CDirectorJournalTask,CUtlMemory<CDirectorJournalTask,int>> *this_00;
  int iVar1;
  char *pcVar2;
  int iVar3;
  int iVar4;
  
  if (*(int *)(param_1 + 0x18) == 2) {
    pcVar2 = "";
    if (*(char **)(param_1 + 8) != (char *)0x0) {
      pcVar2 = *(char **)(param_1 + 8);
    }
  }
  else {
    pcVar2 = (char *)variant_t::ToString((variant_t *)(param_1 + 8));
  }
  iVar1 = TheDirector;
  this_00 = (CUtlVector<CDirectorJournalTask,CUtlMemory<CDirectorJournalTask,int>> *)
            (TheDirector + 0x508);
  iVar4 = 0;
  if (0 < *(int *)(TheDirector + 0x514)) {
    do {
      while (iVar3 = _V_stricmp(pcVar2,(char *)(iVar4 * 0x324 + *(int *)(iVar1 + 0x508) + 5)),
            iVar3 == 0) {
        CUtlVector<CDirectorJournalTask,CUtlMemory<CDirectorJournalTask,int>>::ShiftElementsLeft
                  (this_00,iVar4,1);
        iVar3 = *(int *)(iVar1 + 0x514) + -1;
        *(int *)(iVar1 + 0x514) = iVar3;
        iVar4 = 1;
        if (iVar3 < 2) goto LAB_0087ebdb;
      }
      iVar4 = iVar4 + 1;
    } while (iVar4 < *(int *)(iVar1 + 0x514));
  }
LAB_0087ebdb:
  _V_strcpy((char *)(iVar1 + 0x521),pcVar2);
  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)