L L4D2node

DmeTime_t::TimeAtPrevFrame

0x00bf1730 · 115 bytes · __cdecl

_ZNK9DmeTime_t15TimeAtPrevFrameE14DmeFramerate_t

Decompiled

undefined (1 param)

/* DmeTime_t::TimeAtPrevFrame(DmeFramerate_t) const */

undefined4 * DmeTime_t::TimeAtPrevFrame(undefined4 *param_1,DmeTime_t *param_2,ushort *param_3)

{
  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,2);
  lVar1 = (longlong)(int)uVar5 * (longlong)(iVar2 + -1);
  if (iVar2 + -1 < 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)