L L4D2node

CFuncMoveLinear::Use

0x006c20d0 · 241 bytes · __thiscall

_ZN15CFuncMoveLinear3UseEP11CBaseEntityS1_8USE_TYPEf

Decompiled

undefined (5 params)

/* CFuncMoveLinear::Use(CBaseEntity*, CBaseEntity*, USE_TYPE, float) */

void __thiscall
CFuncMoveLinear::Use
          (CFuncMoveLinear *this,undefined4 param_1,undefined4 param_2,int param_4,float param_5)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  if (param_4 != 2) {
    return;
  }
  if (1.0 <= param_5) {
    param_5 = 1.0;
  }
  fVar3 = (*(float *)(this + 0x460) - *(float *)(this + 0x454)) * param_5 + *(float *)(this + 0x454)
  ;
  fVar6 = fVar3 - *(float *)(this + 0x39c);
  fVar2 = (*(float *)(this + 0x464) - *(float *)(this + 0x458)) * param_5 + *(float *)(this + 0x458)
  ;
  fVar4 = fVar2 - *(float *)(this + 0x3a0);
  fVar1 = (*(float *)(this + 0x468) - *(float *)(this + 0x45c)) * param_5 + *(float *)(this + 0x45c)
  ;
  fVar5 = fVar1 - *(float *)(this + 0x3a4);
  MoveTo(this,fVar3,fVar2,fVar1,SQRT(fVar4 * fVar4 + fVar6 * fVar6 + fVar5 * fVar5) * 10.0);
  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)