L L4D2node

TimeModifierFunc_Cosine

0x005923d0 · 85 bytes · __cdecl

_Z23TimeModifierFunc_Cosinef

Decompiled

undefined (1 param)

/* TimeModifierFunc_Cosine(float) */

longdouble TimeModifierFunc_Cosine(float param_1)

{
  double dVar1;
  
  dVar1 = cos((double)(param_1 + 1.0) * 3.141592653589793);
  return (longdouble)(float)((dVar1 + 1.0) * 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)