L L4D2node

CFuncMoveLinear::SetPosition

0x006c21d0 · 247 bytes · __thiscall

_ZN15CFuncMoveLinear11SetPositionEf

Decompiled

undefined (2 params)

/* CFuncMoveLinear::SetPosition(float) */

void __thiscall CFuncMoveLinear::SetPosition(CFuncMoveLinear *this,float param_1)

{
  float fVar1;
  float fVar2;
  float fVar3;
  float fVar4;
  float fVar5;
  float fVar6;
  
  fVar4 = (*(float *)(this + 0x460) - *(float *)(this + 0x454)) * param_1 + *(float *)(this + 0x454)
  ;
  fVar6 = fVar4 - *(float *)(this + 0x39c);
  fVar3 = (*(float *)(this + 0x464) - *(float *)(this + 0x458)) * param_1 + *(float *)(this + 0x458)
  ;
  fVar1 = fVar3 - *(float *)(this + 0x3a0);
  fVar2 = (*(float *)(this + 0x468) - *(float *)(this + 0x45c)) * param_1 + *(float *)(this + 0x45c)
  ;
  fVar5 = fVar2 - *(float *)(this + 0x3a4);
  if (SQRT(fVar1 * fVar1 + fVar6 * fVar6 + fVar5 * fVar5) <= 0.001) {
    return;
  }
  MoveTo(this,fVar4,fVar3,fVar2,*(undefined4 *)(this + 0x11c));
  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)