L L4D2node

GetSceneDuration

0x00813b40 · 87 bytes · __cdecl

_Z16GetSceneDurationPKc

Decompiled

undefined (1 param)

/* GetSceneDuration(char const*) */

longdouble GetSceneDuration(char *param_1)

{
  char cVar1;
  float fVar2;
  uint local_1c [6];
  
  cVar1 = (**(code **)(*scenefilecache + 0x1c))(scenefilecache,param_1,local_1c);
  fVar2 = 0.0;
  if (cVar1 != '\0') {
    fVar2 = ((float)(local_1c[0] >> 0x10) * 65536.0 + (float)(local_1c[0] & 0xffff)) * 0.001;
  }
  return (longdouble)fVar2;
}

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)