L L4D2node

CMomentaryRotButton::InputSetPositionImmediately

0x00634a80 · 148 bytes · __thiscall

_ZN19CMomentaryRotButton27InputSetPositionImmediatelyER11inputdata_t

Decompiled

undefined (2 params)

/* CMomentaryRotButton::InputSetPositionImmediately(inputdata_t&) */

void __thiscall
CMomentaryRotButton::InputSetPositionImmediately(CMomentaryRotButton *this,inputdata_t *param_1)

{
  float fVar1;
  float local_18;
  float local_14;
  float local_10;
  
  fVar1 = *(float *)(param_1 + 8);
  if (*(int *)(param_1 + 0x18) == 1) {
    if (fVar1 <= 0.0) {
      fVar1 = 0.0;
    }
    if (1.0 <= fVar1) {
      fVar1 = 1.0;
    }
  }
  else {
    fVar1 = 0.0;
  }
  *(float *)(this + 0x624) = fVar1;
  fVar1 = fVar1 * *(float *)(this + 0x444);
  local_14 = *(float *)(this + 0x470) * fVar1 + *(float *)(this + 0x610);
  local_10 = *(float *)(this + 0x474) * fVar1 + *(float *)(this + 0x614);
  local_18 = fVar1 * *(float *)(this + 0x46c) + *(float *)(this + 0x60c);
  CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)&local_18);
  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)