L L4D2node

CFlexAnimationTrack::GetBoundedSample

0x00ba3b30 · 533 bytes · __thiscall

_ZN19CFlexAnimationTrack16GetBoundedSampleEiRbi

Decompiled

undefined (4 params)

/* CFlexAnimationTrack::GetBoundedSample(int, bool&, int) */

undefined1 * __thiscall
CFlexAnimationTrack::GetBoundedSample
          (CFlexAnimationTrack *this,int param_1,bool *param_2,int param_3)

{
  CFlexAnimationTrack *pCVar1;
  int iVar2;
  ushort uVar3;
  longdouble lVar4;
  
  if (param_1 < 0) {
    if (GetBoundedSample(int,bool&,int)::nullstart == '\0') {
      iVar2 = __cxa_guard_acquire(&GetBoundedSample(int,bool&,int)::nullstart);
      if (iVar2 != 0) {
        GetBoundedSample(int,bool&,int)::nullstart._0_4_ = 0;
        GetBoundedSample(int,bool&,int)::nullstart._4_4_ = 0;
        GetBoundedSample(int,bool&,int)::nullstart[8] = 0;
        GetBoundedSample(int,bool&,int)::nullstart[9] = 0;
        __cxa_guard_release(&GetBoundedSample(int,bool&,int)::nullstart);
      }
    }
    GetBoundedSample(int,bool&,int)::nullstart._4_4_ = 0;
    lVar4 = (longdouble)GetZeroValue(this,param_3,true);
    GetBoundedSample(int,bool&,int)::nullstart._0_4_ = (undefined4)lVar4;
    if (param_3 == 0) {
      uVar3 = 0;
      if (this[0x48] != (CFlexAnimationTrack)0x0) {
        uVar3 = *(ushort *)(this + 0x49) & 0x7fff;
      }
      GetBoundedSample(int,bool&,int)::nullstart[9] = (undefined1)(uVar3 >> 7);
      GetBoundedSample(int,bool&,int)::nullstart[8] =
           GetBoundedSample(int,bool&,int)::nullstart[8] & 1 | (char)uVar3 * '\x02';
    }
    else {
      GetBoundedSample(int,bool&,int)::nullstart[8] =
           GetBoundedSample(int,bool&,int)::nullstart[8] & 1;
      GetBoundedSample(int,bool&,int)::nullstart[9] = 0;
    }
    *param_2 = true;
    return GetBoundedSample(int,bool&,int)::nullstart;
  }
  pCVar1 = this + param_3 * 0x14 + 0x10;
  if (*(int *)(pCVar1 + 0xc) <= param_1) {
    if (GetBoundedSample(int,bool&,int)::nullend == '\0') {
      iVar2 = __cxa_guard_acquire(&GetBoundedSample(int,bool&,int)::nullend);
      if (iVar2 != 0) {
        GetBoundedSample(int,bool&,int)::nullend._0_4_ = 0;
        GetBoundedSample(int,bool&,int)::nullend._4_4_ = 0;
        GetBoundedSample(int,bool&,int)::nullend[8] = 0;
        GetBoundedSample(int,bool&,int)::nullend[9] = 0;
        __cxa_guard_release(&GetBoundedSample(int,bool&,int)::nullend);
      }
    }
    lVar4 = (longdouble)(**(code **)**(undefined4 **)(this + 0x58))(*(undefined4 **)(this + 0x58));
    GetBoundedSample(int,bool&,int)::nullend._4_4_ = (undefined4)lVar4;
    lVar4 = (longdouble)GetZeroValue(this,param_3,false);
    GetBoundedSample(int,bool&,int)::nullend._0_4_ = (undefined4)lVar4;
    if (param_3 == 0) {
      uVar3 = 0;
      if (this[0x4f] != (CFlexAnimationTrack)0x0) {
        uVar3 = *(ushort *)(this + 0x50) & 0x7fff;
      }
      GetBoundedSample(int,bool&,int)::nullend[9] = (undefined1)(uVar3 >> 7);
      GetBoundedSample(int,bool&,int)::nullend[8] =
           GetBoundedSample(int,bool&,int)::nullend[8] & 1 | (char)uVar3 * '\x02';
    }
    else {
      GetBoundedSample(int,bool&,int)::nullend[8] = GetBoundedSample(int,bool&,int)::nullend[8] & 1;
      GetBoundedSample(int,bool&,int)::nullend[9] = 0;
    }
    *param_2 = true;
    return GetBoundedSample(int,bool&,int)::nullend;
  }
  *param_2 = false;
  if (*(int *)(pCVar1 + 0xc) <= param_1) {
    return (undefined1 *)0x0;
  }
  return (undefined1 *)(*(int *)pCVar1 + param_1 * 10);
}

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)