L L4D2node

CreateExecutionMarker

0x00118600 · 256 bytes · unknown

_ZL21CreateExecutionMarkerv

Decompiled

undefined (0 params)

/* WARNING: Unknown calling convention -- yet parameter storage is locked */
/* CreateExecutionMarker() */

int CreateExecutionMarker(void)

{
  int iVar1;
  int local_10 [2];
  
  if (g_bExecutionMarkerStreamInitialized == '\0') {
    Plat_FloatTime();
    CUniformRandomStream::SetSeed(0x388740);
    g_bExecutionMarkerStreamInitialized = '\x01';
  }
  if (0x7ff < DAT_003887e0) {
    CUtlVector<int,CUtlMemory<int,int>>::ShiftElementsLeft
              ((CUtlVector<int,CUtlMemory<int,int>> *)&g_ExecutionMarkers,0,1);
    DAT_003887e0 = DAT_003887e0 + -1;
  }
  while (local_10[0] = CUniformRandomStream::RandomInt(0x388740,0), 0 < DAT_003887e0) {
    if (local_10[0] != *g_ExecutionMarkers) {
      iVar1 = 0;
      do {
        iVar1 = iVar1 + 1;
        if (iVar1 == DAT_003887e0) goto LAB_0011866c;
      } while (local_10[0] != g_ExecutionMarkers[iVar1]);
      if (iVar1 == -1) break;
    }
  }
LAB_0011866c:
  iVar1 = CUtlVector<int,CUtlMemory<int,int>>::InsertBefore
                    ((CUtlVector<int,CUtlMemory<int,int>> *)&g_ExecutionMarkers,DAT_003887e0,
                     local_10);
  return g_ExecutionMarkers[iVar1];
}

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)