L L4D2node

SmoothCurve_Tweak

0x000a36e0 · 211 bytes · __cdecl

_Z17SmoothCurve_Tweakfff

Decompiled

undefined (3 params)

/* SmoothCurve_Tweak(float, float, float) */

longdouble SmoothCurve_Tweak(float param_1,float param_2,float param_3)

{
  longdouble lVar1;
  float fVar2;
  double dVar3;
  
  if (param_1 < param_2) {
    fVar2 = (param_1 * 0.5) / param_2;
  }
  else {
    fVar2 = ((param_1 - param_2) * 0.5) / (1.0 - param_2) + 0.5;
  }
  lVar1 = (longdouble)Gain(fVar2,param_3);
  dVar3 = cos((double)(float)lVar1 * 3.141592653589793);
  return (longdouble)(float)((1.0 - dVar3) * 0.5);
}

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)