L L4D2node

NWCEdit::AirNodePlacementPosition

0x00b5f140 · 309 bytes · __thiscall

_ZN7NWCEdit24AirNodePlacementPositionEv

Decompiled

undefined (1 param)

/* NWCEdit::AirNodePlacementPosition() */

NWCEdit * __thiscall NWCEdit::AirNodePlacementPosition(NWCEdit *this)

{
  CBasePlayer *this_00;
  float fVar1;
  float local_40;
  float local_3c;
  float local_38;
  float local_34;
  float local_30;
  float local_2c;
  float local_28;
  float local_24;
  float local_20;
  
  this_00 = (CBasePlayer *)UTIL_PlayerByIndex(CBaseEntity::m_nDebugPlayer);
  if (this_00 != (CBasePlayer *)0x0) {
    CBasePlayer::EyeVectors(this_00,(Vector *)&local_40,(Vector *)0x0,(Vector *)0x0);
    local_2c = 0.0;
    local_34 = local_40;
    local_30 = local_3c;
    VectorNormalize((Vector *)&local_34);
    VectorNormalize((Vector *)&local_40);
    fVar1 = 120.0 / (local_30 * local_3c + local_34 * local_40 + local_2c * local_38);
    (**(code **)(*(int *)this_00 + 0x234))(&local_28,this_00);
    *(float *)this = local_40 * fVar1 + local_28;
    *(float *)(this + 4) = local_3c * fVar1 + local_24;
    *(float *)(this + 8) = fVar1 * local_38 + local_20;
    return this;
  }
  *(undefined4 *)this = vec3_origin;
  *(undefined4 *)(this + 4) = DAT_01053d4c;
  *(undefined4 *)(this + 8) = DAT_01053d50;
  return this;
}

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)