L L4D2node

CSheetExtended::GetSampleForSequence

0x00bde8b0 · 160 bytes · __thiscall

_ZN14CSheetExtended20GetSampleForSequenceEffib

Decompiled

undefined (5 params)

/* CSheetExtended::GetSampleForSequence(float, float, int, bool) */

undefined1 * __thiscall
CSheetExtended::GetSampleForSequence
          (CSheetExtended *this,float param_1,float param_2,int param_3,bool param_4)

{
  int iVar1;
  int iVar2;
  uint uVar3;
  uint uVar4;
  
  iVar2 = *(int *)this;
  if (iVar2 == 0) {
    return s_DefaultSheetSequence;
  }
  iVar1 = iVar2 + param_3 * 4;
  if (*(int *)(iVar1 + 0x184) == 1) {
    return *(undefined1 **)(iVar1 + 4);
  }
  uVar4 = (uint)(2.1474836e+09 <= param_1 * param_2);
  uVar4 = (int)(param_1 * param_2 - (float)(-uVar4 & 0x4f000000)) ^ uVar4 * -0x80000000;
  if (((*(byte *)(iVar2 + 0x104 + param_3) & 1) == 0) || (param_4)) {
    uVar3 = uVar4 & 0x1ff;
  }
  else {
    uVar3 = 0x1ff;
    if (uVar4 < 0x200) {
      uVar3 = uVar4;
    }
  }
  return (undefined1 *)(uVar3 * 0x44 + *(int *)(iVar1 + 4));
}

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)