L L4D2node

DmeTime_t::TimeAtCurrentFrame

0x00bf1630 · 113 bytes · __cdecl

_ZNK9DmeTime_t18TimeAtCurrentFrameE14DmeFramerate_t12RoundStyle_t

Decompiled

undefined (2 params)

/* DmeTime_t::TimeAtCurrentFrame(DmeFramerate_t, RoundStyle_t) const */

undefined4 *
DmeTime_t::TimeAtCurrentFrame
          (undefined4 *param_1,DmeTime_t *param_2,ushort *param_3,undefined4 param_4)

{
  longlong lVar1;
  int iVar2;
  undefined4 uVar3;
  uint uVar4;
  uint uVar5;
  ushort local_20;
  ushort local_1e;
  
  local_20 = *param_3;
  uVar4 = (uint)local_20;
  local_1e = param_3[1];
  uVar5 = (uint)local_1e;
  iVar2 = CurrentFrame(param_2,&local_20,param_4);
  lVar1 = (longlong)(int)uVar5 * (longlong)iVar2;
  if (iVar2 < 0) {
    uVar5 = (uint)lVar1 - uVar4;
    lVar1 = CONCAT44(((int)((ulonglong)lVar1 >> 0x20) - (uint)((uint)lVar1 < uVar4)) +
                     (uint)(0xfffffffe < uVar5),uVar5 + 1);
  }
  uVar3 = __divdi3(lVar1,uVar4,0);
  *param_1 = uVar3;
  return param_1;
}

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)