L L4D2node

SurvivorLocomotion::Approach

0x00962450 · 426 bytes · __thiscall

_ZN18SurvivorLocomotion8ApproachERK6Vectorf

Decompiled

undefined (3 params)

/* SurvivorLocomotion::Approach(Vector const&, float) */

void __thiscall SurvivorLocomotion::Approach(SurvivorLocomotion *this,Vector *param_1,float param_2)

{
  undefined4 uVar1;
  float fVar2;
  float fVar3;
  float *pfVar4;
  Vector *pVVar5;
  float fVar6;
  float local_24;
  float local_20;
  float local_1c;
  float local_18;
  float local_14;
  float local_10;
  
  pfVar4 = (float *)(**(code **)(*(int *)this + 300))(this);
  local_24 = *(float *)param_1 - *pfVar4;
  local_20 = *(float *)(param_1 + 4) - pfVar4[1];
  local_1c = *(float *)(param_1 + 8) - pfVar4[2];
  VectorNormalize((Vector *)&local_24);
  fVar3 = local_1c;
  fVar2 = local_20;
  fVar6 = local_24;
  *(int *)(this + 0xcc) = *(int *)(this + 0xcc) + 1;
  uVar1 = SurvivorBotDebugLocomotion._28_4_;
  *(float *)(this + 0xbc) = param_2 * local_24 + *(float *)(this + 0xbc);
  *(float *)(this + 0xc0) = param_2 * local_20 + *(float *)(this + 0xc0);
  *(float *)(this + 0xc4) = param_2 * local_1c + *(float *)(this + 0xc4);
  *(float *)(this + 200) = *(float *)(this + 200) + param_2;
  if (*(int *)(uVar1 + 0x30) != 0) {
    pfVar4 = (float *)(**(code **)(*(int *)this + 300))(this);
    local_18 = fVar6 * 25.0 + *pfVar4;
    local_14 = fVar2 * 25.0 + pfVar4[1];
    local_10 = fVar3 * 25.0 + pfVar4[2];
    pVVar5 = (Vector *)(**(code **)(*(int *)this + 300))(this);
    fVar6 = param_2 * 5.0;
    if (10.0 <= fVar6) {
      fVar6 = 10.0;
    }
    NDebugOverlay::HorzArrow(pVVar5,(Vector *)&local_18,fVar6,0xff,0xff,0,0xff,true,0.1);
  }
  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)