L L4D2node

CTestScriptMgr::SetWaitCheckPoint

0x00219df0 · 458 bytes · __thiscall

_ZN14CTestScriptMgr17SetWaitCheckPointEPKcb

Decompiled

undefined (3 params)

/* CTestScriptMgr::SetWaitCheckPoint(char const*, bool) */

void __thiscall CTestScriptMgr::SetWaitCheckPoint(CTestScriptMgr *this,char *param_1,bool param_2)

{
  int iVar1;
  char cVar2;
  int iVar3;
  int iVar4;
  char *pcVar5;
  char *local_24 [5];
  
  if ((*(int *)(testscript_debug._28_4_ + 0x30) != 0) &&
     (iVar4 = _V_stricmp(param_1,"frame_end"), iVar4 != 0)) {
    pcVar5 = " (once).";
    if (!param_2) {
      pcVar5 = ".";
    }
    Msg("TESTSCRIPT: waiting for checkpoint \'%s\'%s\n",param_1,pcVar5);
  }
  if ((param_2) && (param_1 != (char *)0x0)) {
    iVar4 = *(int *)(this + 0x68);
    local_24[0] = param_1;
    if (iVar4 != -1) {
      iVar3 = *(int *)(this + 0x5c);
      do {
        while( true ) {
          iVar1 = iVar4 * 0x18;
          cVar2 = (**(code **)(this + 0x58))(local_24,iVar3 + 0x10 + iVar1);
          if (cVar2 != '\0') break;
          cVar2 = (**(code **)(this + 0x58))(*(int *)(this + 0x5c) + iVar1 + 0x10,local_24);
          if (cVar2 == '\0') {
            if (iVar4 != -1) {
              return;
            }
            goto LAB_00219eb8;
          }
          if ((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
               ::Links(int)::s_Sentinel == '\0') &&
             (iVar4 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                                           ::Links(int)::s_Sentinel), iVar4 != 0)) {
            CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
            ::Links(int)::s_Sentinel = 0xffffffff;
            DAT_0034075c = 0xffffffff;
            DAT_00340760 = 0xffffffff;
            __cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                                 ::Links(int)::s_Sentinel);
          }
          iVar3 = *(int *)(this + 0x5c);
          iVar4 = *(int *)(iVar3 + 4 + iVar1);
          if (iVar4 == -1) goto LAB_00219eb8;
        }
        if ((CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
             ::Links(int)::s_Sentinel == '\0') &&
           (iVar3 = __cxa_guard_acquire(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                                         ::Links(int)::s_Sentinel), iVar3 != 0)) {
          CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
          ::Links(int)::s_Sentinel = 0xffffffff;
          DAT_0034075c = 0xffffffff;
          DAT_00340760 = 0xffffffff;
          __cxa_guard_release(&CUtlRBTree<CUtlMap<char_const*,int,int>::Node_t,int,CUtlMap<char_const*,int,int>::CKeyLess,CUtlMemory<UtlRBTreeNode_t<CUtlMap<char_const*,int,int>::Node_t,int>,int>>
                               ::Links(int)::s_Sentinel);
        }
        iVar3 = *(int *)(this + 0x5c);
        iVar4 = *(int *)(iVar3 + iVar4 * 0x18);
      } while (iVar4 != -1);
    }
  }
LAB_00219eb8:
  V_strncpy((char *)(this + 8),param_1,0x20);
  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)