L L4D2node

CMomentaryRotButton::UpdateSelf

0x00639400 · 350 bytes · __thiscall

_ZN19CMomentaryRotButton10UpdateSelfEfb

Decompiled

undefined (3 params)

/* CMomentaryRotButton::UpdateSelf(float, bool) */

void __thiscall
CMomentaryRotButton::UpdateSelf(CMomentaryRotButton *this,float param_1,bool param_2)

{
  int iVar1;
  float local_18;
  float local_14;
  float local_10;
  
  CBaseEntity::SetMoveDoneTime((CBaseEntity *)this,0.1);
  iVar1 = *(int *)(this + 0x630);
  if (iVar1 < 1) {
    if ((iVar1 != 0) && (param_1 <= 0.0)) {
      CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
      CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(this + 0x60c));
      COutputEvent::FireOutput
                ((COutputEvent *)(this + 0x5c0),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
      return;
    }
  }
  else if (1.0 <= param_1) {
    CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&vec3_angle);
    CBaseEntity::SetLocalAngles((CBaseEntity *)this,(QAngle *)(this + 0x618));
    COutputEvent::FireOutput
              ((COutputEvent *)(this + 0x5d8),(CBaseEntity *)this,(CBaseEntity *)this,0.0);
    return;
  }
  if (param_2) {
    PlaySound(this);
    iVar1 = *(int *)(this + 0x630);
  }
  local_10 = (float)iVar1 * *(float *)(this + 0x11c);
  local_18 = *(float *)(this + 0x46c) * local_10;
  local_14 = *(float *)(this + 0x470) * local_10;
  local_10 = local_10 * *(float *)(this + 0x474);
  CBaseEntity::SetLocalAngularVelocity((CBaseEntity *)this,(QAngle *)&local_18);
  *(code **)(this + 0x14) = UseMoveDone;
  *(undefined4 *)(this + 0x18) = 0;
  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)