L L4D2node

CSheet::GetSampleForSequence

0x00bde700 · 141 bytes · __thiscall

_ZN6CSheet20GetSampleForSequenceEffib

Decompiled

undefined (5 params)

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

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

{
  uint uVar1;
  uint uVar2;
  
  if (*(int *)(this + param_3 * 4 + 0x184) == 1) {
    return *(int *)(this + param_3 * 4 + 4);
  }
  uVar2 = (uint)(2.1474836e+09 <= param_1 * param_2);
  uVar2 = (int)(param_1 * param_2 - (float)(-uVar2 & 0x4f000000)) ^ uVar2 * -0x80000000;
  if ((((byte)this[param_3 + 0x104] & 1) == 0) || (param_4)) {
    uVar1 = uVar2 & 0x1ff;
  }
  else {
    uVar1 = 0x1ff;
    if (uVar2 < 0x200) {
      uVar1 = uVar2;
    }
  }
  return uVar1 * 0x44 + *(int *)(this + param_3 * 4 + 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)