L L4D2node

CChoreoEvent::RescaleGestureTimes

0x00ba6710 · 252 bytes · __thiscall

_ZN12CChoreoEvent19RescaleGestureTimesEffb

Decompiled

undefined (4 params)

/* CChoreoEvent::RescaleGestureTimes(float, float, bool) */

void __thiscall
CChoreoEvent::RescaleGestureTimes(CChoreoEvent *this,float param_1,float param_2,bool param_3)

{
  int iVar1;
  int iVar2;
  int iVar3;
  int iVar4;
  longdouble lVar5;
  float fVar6;
  float local_2c;
  
  if (this[4] == (CChoreoEvent)0x6) {
    if (param_1 == *(float *)(this + 0x48)) {
      if (param_2 == *(float *)(this + 0x4c)) {
        return;
      }
      local_2c = 0.0;
    }
    else {
      local_2c = -(param_1 - *(float *)(this + 0x48));
    }
    if ((param_3) && (iVar1 = *(int *)(this + 0xf0), 0 < iVar1)) {
      iVar4 = 0;
      iVar3 = 0;
      do {
        iVar3 = iVar3 + 1;
        iVar2 = *(int *)(this + 0xe4) + iVar4;
        iVar4 = iVar4 + 0x1c;
        fVar6 = *(float *)(iVar2 + 0x10);
        lVar5 = (longdouble)(*(code *)**(undefined4 **)this)(this);
        fVar6 = ((float)lVar5 * fVar6 + local_2c) * (1.0 / (param_2 - param_1));
        if (fVar6 <= 0.0) {
          fVar6 = 0.0;
        }
        if (1.0 <= fVar6) {
          fVar6 = 1.0;
        }
        *(float *)(iVar2 + 0x10) = fVar6;
      } while (iVar3 != iVar1);
      return;
    }
  }
  return;
}

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)