L L4D2node

CMomentaryRotButton::GetPos

0x00637e20 · 234 bytes · __thiscall

_ZN19CMomentaryRotButton6GetPosERK6QAngle

Decompiled

undefined (2 params)

/* CMomentaryRotButton::GetPos(QAngle const&) */

longdouble __thiscall CMomentaryRotButton::GetPos(CMomentaryRotButton *this,QAngle *param_1)

{
  longdouble lVar1;
  float fVar2;
  float local_1c;
  
  if (*(float *)(this + 0x46c) <= 0.0 && *(float *)(this + 0x46c) != 0.0) {
    local_1c = -1.0;
  }
  else if (*(float *)(this + 0x470) <= 0.0 && *(float *)(this + 0x470) != 0.0) {
    local_1c = -1.0;
  }
  else if (*(float *)(this + 0x474) <= 0.0 && *(float *)(this + 0x474) != 0.0) {
    local_1c = -1.0;
  }
  else {
    local_1c = 1.0;
  }
  lVar1 = (longdouble)
          CBaseToggle::AxisDelta(*(int *)(this + 0x148),param_1,(QAngle *)(this + 0x60c));
  fVar2 = ((float)lVar1 * local_1c) / *(float *)(this + 0x444);
  if (fVar2 <= 0.0) {
    fVar2 = 0.0;
  }
  if (1.0 <= fVar2) {
    fVar2 = 1.0;
  }
  return (longdouble)fVar2;
}

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)