L L4D2node

GCSDK::CGCBase::BMainLoopUntilFrameCompletion

0x0007a020 · 93 bytes · __cdecl

_ZN5GCSDK7CGCBase29BMainLoopUntilFrameCompletionEy

Decompiled

undefined (1 param)

/* WARNING: Globals starting with '_' overlap smaller symbols at the same address */
/* GCSDK::CGCBase::BMainLoopUntilFrameCompletion(unsigned long long) */

void GCSDK::CGCBase::BMainLoopUntilFrameCompletion(ulonglong param_1)

{
  longlong lVar1;
  longlong lVar2;
  int in_stack_0000000c;
  longlong local_14 [2];
  
  lVar2 = rdtsc();
  lVar1 = (ulonglong)_g_dwClockSpeed * (param_1 >> 0x20);
  local_14[0] = __udivdi3((int)lVar1,
                          (int)((ulonglong)lVar1 >> 0x20) + in_stack_0000000c * _g_dwClockSpeed,
                          1000000,0);
  local_14[0] = local_14[0] + lVar2;
  CJobMgr::BFrameFuncRunYieldingJobs((CJobMgr *)((int)param_1 + 4),(CLimitTimer *)local_14);
  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)