L L4D2node

CDirectorScriptedEventManager::GetCustomScriptedStageProgress

0x008b89d0 · 303 bytes · __thiscall

_ZN29CDirectorScriptedEventManager30GetCustomScriptedStageProgressEf

Decompiled

undefined (2 params)

/* CDirectorScriptedEventManager::GetCustomScriptedStageProgress(float) */

longdouble __thiscall
CDirectorScriptedEventManager::GetCustomScriptedStageProgress
          (CDirectorScriptedEventManager *this,float param_1)

{
  int iVar1;
  int iVar2;
  void *pvVar3;
  void *local_34 [2];
  short local_2c;
  ushort local_2a;
  void *local_28;
  undefined4 local_24;
  undefined2 local_20;
  ushort local_1e;
  
  iVar1 = TheDirector;
  iVar2 = (**(code **)(*g_pScriptVM + 0x48))
                    (g_pScriptVM,"GetCustomScriptedStageProgress",
                     *(undefined4 *)(TheDirector + 0x4a0),0);
  if (iVar2 == 0) {
    return (longdouble)param_1;
  }
  local_2c = 0;
  local_1e = 0;
  local_20 = 1;
  local_2a = 0;
  local_34[0] = (void *)0x0;
  local_24 = 0;
  local_28 = (void *)param_1;
                    /* try { // try from 008b8a79 to 008b8a7b has its CatchHandler @ 008b8b1f */
  (**(code **)(*g_pScriptVM + 0x50))
            (g_pScriptVM,iVar2,&local_28,1,local_34,*(undefined4 *)(iVar1 + 0x4a0),1);
  if ((local_1e & 1) != 0) {
    free(local_28);
  }
                    /* try { // try from 008b8a90 to 008b8a92 has its CatchHandler @ 008b8b0d */
  (**(code **)(*g_pScriptVM + 0x4c))(g_pScriptVM,iVar2);
  pvVar3 = local_34[0];
  if (local_2c != 1) {
    pvVar3 = (void *)(float)(int)local_34[0];
  }
  if ((local_2a & 1) == 0) {
    return (longdouble)(float)pvVar3;
  }
  free(local_34[0]);
  return (longdouble)(float)pvVar3;
}

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)